@Peter ******
, you better talk with your local immigration office in advance. I believe you need an entry stamp on your passport that is used for an extension since your new passport was obtained outside Thailand. Basically, you cannot change foreign valid passports inside Thailand.
In that case, you have to get a new extension on your old (and "current" in Thailand) passport, which means your next extension is until the passport validity, 01 February 2026 instead of August 2026.
Or you leave and enter Thailand again on your new passport, at least one of the ways by air to switch passports.