It sounds like you had a very relatable "cheat day" experience. It's perfectly fine to have a cheat day, but it's important to be mindful of your sugar intake and return to healthy eating afterward.
This is a smart approach to maintaining a healthy lifestyle while still allowing yourself some indulgence.