OP, note that while your old passport is cancelled any relevant stamps etc remain Valid.
You can exit and reenter Thailand with both passports.
You could leave transfer till your 90 day report window is open and do the TM47 and transfer of stamps same visit.
https://aseannow.com/applications/core/interface/file/attachment.php?id=939160&key=2e63bc0d8abee18369df31b777516cb4
Note to anyone that has extension based on retirement and attending CW for transfer of stamps there is list of required docs is on page 2 of link above.
Added requirement not listed is need to provide photocopies of bankbook pages and update..