An extension of stay based on ED can only be cancelled with a letter from the school and in person at immigration
People have been fined after returning to Thailand on a new visa. When they go to do an extension on their new visa or have any contact with immigration - it’s then the immigration will notice the previous extension was NOT cancelled and they can and do fine you 500 Baht per day up to the maximum of 20,000 baht.
There is a big stamp you get that shows you cancelled the extension - if you don’t have that stamp then was never cancelled!
Ben Bogaerts yes most people refer to visa when often it is actually an extension of stay, and you said “...you don’t have anything anymore...” which was incorrect because it’s very likely he is on extension of stay which must be cancelled.
Get a letter from your school cancelling your study dated the day you left Thailand and take it to immigration ASAP when you return. If you do it within 24-48 hours of arriving back in Thailand then should be ok.
WRONG - an ED extension of stay must be cancelled in person at immigration with letter from school before you leave Thailand.
Leaving the country does not automatically cancel an extension of stay - and even if you return on new visa you can be fined up to 20,000 Baht for overstaying on the previous extension of stay because it was not cancelled.