Assigning a key to an animation

I want to play a pickup animation for the character I created with C++ in Unreal Engine 5 when I press the E key on the keyboard. I’ve already imported the animation into the engine — how can I do it?

Not sure how you’re setting up the rest of your characters animations, but generally the best option for this kind of thing is Animation Montages.