Hello MohaammedH,
Thank you for using Apple Support Communities!
I understand from your post that your iPhone battery stops charging at 90% and then finishes an hour later. What you are describing sounds like Optimized Battery Charging. This article explains how Optimized Battery Charging works which you may find useful:
About Optimized Battery Charging on your iPhone - Apple Support
"With iOS 13 and later, Optimized Battery Charging is designed to reduce the wear on your battery and improve its lifespan by reducing the time your iPhone spends fully charged. When the feature is enabled, your iPhone will delay charging past 80% in certain situations. Your iPhone uses on-device machine learning to learn your daily charging routine so that Optimized Battery Charging activates only when your iPhone predicts it will be connected to a charger for an extended period of time. The algorithm aims to ensure that your iPhone is still fully charged when unplugged."
Best Regards.