I've had success printing this on the top flat, PETG or PLA. it fits the 3mm long by 3mm diameter cylindrical magnets similar to these: https://www.amazon.com/200PCS-Magnets-3mmX3mm-Neodymium-Permanent/dp/B0BPR595XP/ref=sr_1_3?crid=RMYO0QLHMOIZ&dib=eyJ2IjoiMSJ9.K0kYm2aVq_oj2i4gMpkqsXSJbWV5dZNCawOicQsZkq_Jw0lpP7NLFm4Gkpman1cuPl3irsLaTtjea_ul3shugOicD2axoG3hz9xY0TARI4Kdq3ZBfcRxrVuNA0LitadnTkTxCIggge-y9IIoqIQr4kLVLB8Vd-qYHmXUejb7ncDpNrbHWpd7c8nHAXUjN0wMZkGiRkGBctmonhh-lKE6ZAg412gyLC_bD1GZOWLoMS4.R36NOPW_x4WxehSc8JAkoclm7qOiNgmzEDYpb6aMtb8&dib_tag=se&keywords=3mm%2Bx%2B3mm%2Bcylinder%2Bmagnets&qid=1736191514&sprefix=3mm%2Bx%2B3mm%2B%2Caps%2C91&sr=8-3&th=1
the marker should fit snug but not too tight as to crack the print. I suggest printing a 98% to scale and a 102% to scale to troubleshoot any fit problems you may have with the marker. the magnets should fit without the aid of CA glue but if they are loose a slight dab on the magnet when inserting can fix that. if you had to scale the model down for the marker to be more secure I would take a 3mm drill bit and hone out the hole a little for a press fit.
The markers this cap is for are these https://www.expomarkers.com/markers/dry-erase-markers/expo-low-odor-dry-erase-markers-fine-tip/SAP_2138429.html
The author marked this model as their own original creation.