Question RX 5700 Displays but is not Detected by PC

Aug 26, 2022
GPU: RX 5700
CPU: Ryzen 5 3600
Motherboard: Asus Prime B450m-k
Ram: 16GB
Power Supply: 650Watts

So recently I decided to Factory reset my pc, once the factory reset finished I realised that my gpu was not appearing in task manager, I tried installing the drivers for it and it just came up with errors. I decided to try to use DDU to uninstall my graphic drivers and then reinstall them but that did not fix anything. I tried factory resetting again, and then re installing windows through the settings menu. The next day I flashed and re install my bios and that also didn't fix the problem. My bios is also stuck in Legacy mode. I don't think the gpu is broken because I have my monitor connected to it using a display port. I have tried installing a new chipset that also didn't work it just says error. And in my Device manager my PCI devices have no drivers. are I'm losing hope with it, does anyone know a potential fix. Thank you. PS before the factory reset my pc worked perfectly fine.