To make a 10 round mag designed for the P365 frame to fit in a P365XL, or P365X frame/grip module, then the 10 XL conversion basepad is what you want.
It comes in four different sizes, Flush fit, small pinky ledge (Pro Ledge), Large Pro Ledge, and Extended Pro Ledge versions. These basepads do not extend capacity, and are Not compatible with the magguts spring and follower system.
Flush Fit, and Pro Ledge (use 'Length' drop down on product page to select between the two.)
https://tactical.dev/collections/sig-sauer-p365xl-accessories/products/10-round-xl-filled-basepad-for-sig-p365-xl-10-round-magazines
Large Pro Ledge
https://tactical.dev/collections/all-p365-sas-x-xl-products/products/large-pro-ledge-10-xl
Extended Pro Ledge
https://tactical.dev/collections/all-p365-sas-x-xl-products/products/extended-pro-ledge-10-xl
Please use provided links on the basepad's product page, that link to the specifically compatible magazines on Sig's site, if further clarification is needed.