Is there a macro to automatically delete the mistakes?

I’m not good at English. I’m sorry.

If an actor makes a mistake while recording
After remembering the part where the actor made a mistake, press the recording button twice to punch in and out, and manually delete the part that he made a mistake.

I couldn’t cut off the recording for editing, so this is the only way.

I did Google search and found out that there is a way to use markers to check for mistakes and use macros to automatically delete them.

What can I do?

I’ve used macros often, but I don’t know this at all.

If possible, I’d like to delete the mistakes and make the gaps disappear.