You need to apply for non O with 15+ days remaining on you permit.
Some offices longer eg CM 21 days +
Hence some folk apply for 30 day extension to visa exempt entry.
Do you have a Thai bank account in your name only.
Which immigration office.
Non O based on marriage or retirement?
https://aseannow.com/topic/1311886-visa-exempt-to-retirement-extension-process-and-cost/