This video explains how a state machine workflow can be created in PowerAutomate.
Video explains the live example of transitioning from One State to Another State based on outcome of previous State.
Please watch full video to understand step by step process.