What is PUCCH format selection criteria?

Hi Experts.

What is PUCCH format selection criteria for 5G?

When retx format 2 is selected, due to which retx failing, while if it’s pucch 0 selection than it’s working fine.
Any idea how algorithm selecting format 2?

Thanks…