The replace it for you in any Huawei shop, but you can replace it yourself.
You can buy one here: https://www.aliexpress.com/item/Official-Original-Tempered-Glass-Back-Battery-Cover-For-Huawei-P10-Lite-Phone-Case-Housing-Replacement-Parts/32825679491.html?spm=a2g0s.9042311.0.0.kKYWXP
This is not official, but this is the closest, some details are missing.
I ordered one abput 3 weeks ago, I will tell you how it works if it arrives.
There is a video of how to dissassemble the phone: https://www.youtube.com/watch?v=fF-5cqeYnzE
You will need something to heat up the phone, like a heat gun.