How to make a parry system?

Hi guys, I am currently doing a combat system where I can attack and block, and I wanted to add the possibility of parrying an attack, (like in honor or sekiro) but I don’t know where to start about it.

If your attack and block logic is already in place then have the character auto attack when it is struck while blocking. If your attack and block arent set up yet then you have to get there first. Fighting games require somewhat advanced programming skills.