How can I avoid triple confirmation modalities

Instead of Yes / No answers for the second confirmation mode, provide response options that summarize what will happen for each possible answer. For example, in the case of file deletion, use the buttons labeled Delete file and Keep the file.

This will keep the functionality similar and make the experience simple and elegant

You can also consider using progressive disclosure to allow users to learn more about the consequences of their order before posting, while keeping the text in the confirmation dialog short enough to make it easy to scan. .