SSD not detected by bios, but works as external drive
I was trying to fix another issue with my pc, and when I tried to boot, my SSD was not detected anymore. Other drives are but my SSD isn't, I've tried different cables and different ports and I get nothing. When I hooked it up to another computer it did not see it as an internal drive either. Also when I booted into another drive, it was not seen as an extra internal drive, but my other one was.
When I connected it to another computer externally, it is detected and works like any other external drive.
So is the boot partition messes up or something? Its not even detected in the bios so im not sure whats wrong. It worked perfectly fine until I unplugged it and after that it wouldnt work again.
So my question is what happened and how can I fix this without wiping it. If I need to wipe it that's fine, I can access it and back my data up.