If you purchased a Ryzen "Processor in a Box" retail processor than it has a 3 year AMD Warranty. But the Warranty goes into effect once the Retailer Warranty expires.
First ask if the Retailer's Warranty will send you a replacement if not open a AMD Warranty Request from here: https://www.amd.com/en/support/kb/warranty-information/rma-form
From past experience you can't purchase that part separately at Retail stores. Other Users have been able to get replacements from AMD Warranty.