OnePlus does not sell loose parts, so your phone would have to visit a service center. Check the support tab on the OnePlus website for repair pricing. Though it is sometimes possible to find parts on websites like eBay or phone repair tool websites.
Do you want to buy the spare part and fix it yourself?
Or do you want to give your phone to OnePlus Service Centre for fixing?
Also this isn't the right place to post for the 8 Pro, I've asked the mods to move it.
Answered and thread closed
Raffle Time: OnePlus Buds Z + Lemonade T-Shirt
by Jade D., 2021-04-09