You'll want to use a few variables for this. One that shows what your last attack was, and a couple to act as timers. When you press the button to attack, check the state of the attack variables and do the logic accordingly.
So if you press the button with all the variables at 0, it will do the first attack and increment the variable that tracks what your last attack was, then start running down a short timer variable. If they attack while the last attack variable is 1 and before the timer is up, play the second attack and reset the timer. Then do the same for the third. This will let you combo attacks together, while reverting you back to the first attack if you don't attack for too long.
It can be a bit complicated, so if you aren't used to using variables you may want to read up on them a bit, and try to keep it simple at first. Maybe start by just implementing a single variable that increases by one with each attack, and plays a different attack animation based on its state.
For making only a certain part of the attack hit the enemy, you'll want to spawn a separate "hitbox" object, an invisible rectangle that overlaps with the sword but not with the rest of the enemy. Give the hitbox a lifespan variable so it doesn't stay around after the animation, or just remove it when the animation ends. You can even change the size and positioning of the hitbox to match the sword in different animation frames, though that gets more complicated.
If your animations aren't centered well, you want to change the hotspot, which is in the animation editor. It decides what point the animation is "centered" around, so you'll generally want it to be in a consistent place on the character.