I'm stuck creating a 2D sidescroller where the character will play the punch animation but then after releasing the punch key returns to a static pose and does not play the running animation again but instead glides along the ground

To elaborate more the main problem is that when releasing the punch key the character does not return to the idle animation. I have looked at animation blueprints and I think that’s the way to go but I’m not sure what to do or how to start it.

I’ve been looking at various Unreal tutorials and they only ever relate to a third person tutorial and I cannot find anything that points me in the right direction. I am inexperienced with UE4 so any help would be much appreciated to solve this problem.

I am not exactly sure how you have it setup but the way I do it is like this:
I have a boolean called “Disable Animation State”.
For specific animations that I want to play once I use this boolean to turn off updating the Animation State.
I then set the flip book to the animation I want to run one time. You get the flipbook length as the delay time.
Then when its over, turn the “Disable Animation State” off and it will update your flipbook like normal.
Works good for animations I only want to play once and then return to normal.
But depending on your situation this may not work for you.