I'm just posting thise here in case someone else has the same issue.
Issue: Windows was freezing and rebooting at the selection of the fast or custom graphic driver installation. The "AMD Cleanup Utility" or the "Display Driver Uninstaller" had the same issue in the safe mode of windows.
System: Windows 10, 64 bit
Motherboard: msi x570-a pro,
Cpu: ryzen 7 3800x
Graphics card: XFX Radeon RX 5700 XT Thicc II
Solution: I had to unplug my optical drive.