Apologies if this is straightfoward, but how can I add the Created and Created By columns to the DispForm.aspx in a SharePoint Online list?
By default in the DispForm.aspx, it will display when the item was created and who created the item as shown below.
I suppose that you means the modern display item panel. The DispForm.aspx is the classic page.
The example modern view:
To display Created and Created By on it, you can customize it using PowerApps.