The P365XL is precut for optics which fit the Shield RMSc footprint. There are quite a few to choose from:
Sig RomeoZero
Sig RomeoZero Elite
Shield RMSc
Shield SMSc
Crimson Trace CT1500 series
Holosun 407K
Holosun 507K
Swampfox Sentinel
Riton MPRD-3 v2
I’m sure there are others. Most of these have bottom-loading batteries, meaning you have to remove the optic from the pistol to change the battery. Some, such as the Holosuns, have a side-loading battery tray. Some just have a dot. Some have a reticle or circle-dot option. Some are polymer, some are aluminum. Some have polymer lenses, some have glass lenses. Some are shake-awake, some are auto-off, some are auto-brightness. All are adjustable for windage and elevation.
I have a Holosun 507K, a Sig RomeoZero, and a Riton MPRD. They all work, they all hold zero, they were all easy enough to install. Lots and lots of YouTube reviews out there, and there are tons of posts on the SigTalk forum on P365x/XL optics if you’re looking for owner opinions.
Hope this helps! Let us know what you go with.