The State pattern suggests to create new classes for all possible states of a context object and to extract the state-related behaviors into these classes. The context will contain a reference to a state object that represents its current state. Instead of performing a behavior on its own, the context will delegate the execution to a state object. To change the context's state, one would pass another state object to the context. But to make states interchangeable, all states classes must follow the common interface, and the context must communicate with its state object via that interface. The described structure may look like the Strategy pattern, but there is one key difference. In the State pattern, the context, as wells as particular states, can initiate the transitions from one state to another.
Read more about the State Pattern here: https://refactoring.guru/design-patterns/state