The X button has been lying to you about closing your apps.
Task Manager works, but it’s not the quickest tool for every freeze.