What's the best way to go about game states?

In my past games I handled game states by having a million booleans everywhere, and I eventually got tired of the logic issues with doing this.

What’s the best way to handle game states?