I need help

What is the correct way to close the game?

Save and then click the X at the top right of the window.

I thought I had a specific way to close because I had read in a post that if the game is closed incorrectly, it may cause bugs