how to make your sprite react to your minigame

i’m a newbie and i haven’t started my project just in case, but basically what should i start with when i want to make a game of pong but my characters react to the minigame? for example the player is my character who would be on the left side, my other character is on the right, and when they lose/miss the pong they play a certain animation of them losing

here are my examples: Lotsofsock's Sock Sorter by Yaffy

sorry if i still don’t make sense,

You can use a spritesheet with all frames of the animation in one file and then put it inside a Sprite2D-node or AnimatedSprite2D-node.
The file should look something like this: