How to use 1 Key for 2 animations being played individually one after another

That just sounds like a bug. But before you go too deep into debugging…

Anything with Animations / Animators / Mechanim:

Only consider the code AFTER you have done this critical step:

Always start with the Animator state machine and prove it works in isolation, no code at all.

Here’s more reading:

NOW… once you are 100% sure the animation side of things is perfect, move to the code.

If it still doesn’t work then it is time to start debugging!

By debugging you can find out exactly what your program is doing so you can fix it.

Use the above techniques to get the information you need in order to reason about what the problem is.

You can also use Debug.Log(...); statements to find out if any of your code is even running. Don’t assume it is.

Once you understand what the problem is, you may begin to reason about a solution to the problem.