To add to this, could also be a cold or cracked solder joint making intermittent connection.
If you get desperate, you can look at reflow options. I know the old Xboxs people would bake. Best to just take a look at the solder joints for all the connectors. Are they still shiny? Or dull and cracked?
2006 Our Highschool had “recycled” some of the older machines and it started from there.
A Dell Optiplex GX1 500MHz, with 128mb of ram, and a 80gb IDE HHD. Installed Debian Sarge, This was running a dial-up gateway for our home network as well as samba.
It allowed one machine to be the LANs internet connection, abet slow. Samba was so I could download installers once, and then pull them from the network drive.
2008-2012 that machine was a dedicated WordPress machine. Around 2019 I pulled it out of the closet and powered it up. The whole site was there, still ran without a hiccup. It was actually recycled shortly after that, Dell used to make great hardware.