Close the game by hitting esc and then hit save and quit you will be brought to the main menu and you can hit quit game, oh wait I’m thinking of actual Minecraft Java now…