Reminds me how I dropped my new Ryzen while unpacking - it just flung itself as I opened the package, and bent half the pins on one side. Miraculously, I managed to straighten up some pins from the corner (and they're very tiny and annoying), and then shove it into the socket - it somehow fixed itself and works to this day. From then on I'm unpacking any AMD CPU close to a soft surface in case they decide to suicide again. I bet they would've not sent me a replacement though, lol.
Very careful hands and a mechanical pencil that has a straightened metal tip is good for these kinds of fixes. Remove the lead and use the small tip to carefully straighten the pins. Be very careful and slow though. One push too hard and you can snap a pin off entirely then you are basically SOL.
This is what I am talking about: !
Yeah, I used tweezers or something for that. Hilariously enough, my bro also found himself in a similar situation around that time when he tried to build himself a PC while in the military, his case was way worse because he flattened almost all the pins and some broke off. Somehow, some miracle guy there fixed it up for him and it just worked.