AMD Warranty does not cover for bent or broken CPU pins. This is normally considered to be Customer Error thus the Warranty is voided.
The only scenario, in my own opinion, where possibly your CPU might be replaced is if you can see bent or broken pins in an "Unopen" plastic cover or box and took photos of it in that condition. But mostly likely AMD would say to go to your Retailer to get a refund or a new CPU since AMD Warranty doesn't cover bent or broken pins on a CPU.
You are the second User that opened a thread in where the User damaged his AMD CPU pins (bent and broken also) while removing the CPU Cooler. AMD also refused the RMA from that User when they saw the broken pins.
As to why the CPU came loose from its Motherboard socket, I can't answer that since I don't have a Ryzen CPU. But aren't they screwed into the Motherboard?
Besides, in your case, it was purely Customer Error since the pins actually broke after you removed the Cooler and not before when you originally removed from the Ryzen forcefully from the MoBo socket with the CPU Cooler.
From AMD Warranty showing what is not covered by the Warranty: Warranty Service: Retail CPUs Purchased New in Box | AMD