Why can the POCO X7 Pro only be charged up to 80%?

It is due that you have enabled battery health protection or a smart charging protection feature. You can turn on the regular charging in the [Settings] >> [Battery] >> [Battery protection] >> [Regular charging], which will always allow the phone to charge up to 100%. The battery health protection feature is designed to extend the battery's lifespan and protect it.
There are three options in the charging protection settings: regular charging(Always allow charging up to 100%), optimized charging(Adjust charging based on usage scenarios), and battery protection(To extend battery life, the device will stop charging when battery level reaches 80%).