Find the Settings on your iPhone's desktop.
Enter the Settings screen, click on the battery option.
Then in the battery interface, click on the battery health option.
Enter the battery health interface, then choose to turn on the optimized battery charging function, and then charge.