Iframes are your best friend
Like most games, even Shovel Knight Dig has certain Iframes that make the player invincible for a moment in which they can deal damage to the enemy. No matter how skilled you are, you are bound to get hit. Shovel Knight Dig gives players Iframes for 2 seconds after they get hit by an enemy. Use that Iframe to deal more damage.