This tutorial series gives a grounding in the fundamentals of state machines, the state pattern and how they can be applied (and enhanced) with the Unreal Engine.
https://dev.epicgames.com/community/learning/tutorials/7Kjb/unreal-engine-state-machines-in-unreal-5-7