Re-entry permits are sold at the immigration office and at most international airports. Seeing as you are on an entry stamp from an OA visa that is expired (meaning it's multiple entry part is expired too) you need to buy one before you leave the country OR your entry stamp will cancel when you stamp out.
You can buy a re-entry permit at the Chaengwattana office in Bangkok they are 1000 baht for a single re-entry (meaning you can leave/come back ONCE) and 3800baht for a multiple re-entry (meaning you can leave/come back as many times as you want) Re-entry permits are valid for the length of your current entry stamp and when you do enter the country with it you will be stamped in until your current expiration date of the stamp you're here on now (Nov 8, 2022)
OR
You can by a re-entry permit at Suvarnabhumi airport
****
on the day you fly out
When you fill out the TM8 re-entry permit application form you can put tentative dates in, they don't check or care. As I said the the re-entry permit will be valid as long as your current extension stamp is valid for.