Your iPhone battery icon can be a number of different colors. It might be white, black, green, red, or even yellow.
Your iPhone battery icon is yellow because Low Power Mode is enabled.
Some of the battery icon colors that you see are due simply to your background color. If it’s a light color then the battery icon will be black, or if it’s dark then the battery icon will be white.
But the other battery icon colors, such as green, yellow, or red indicate the status of the battery.
Your iPhone has something called Low Power Mode that will activate itself when the battery gets below 20%. This causes the phone to change some settings in an attempt to extend that battery life as long as possible.
You can manually enable Low Power Mode by going to Settings > Battery and turning it on. There is also a Low Power Mode switch in the Control Center that is accessible by swiping down from the top-right on iPhone models without a Home button.
If your iPhone has a Home button, then you can open the Control Center by swiping up from the bottom of the screen.
If you often run into problems with your battery life, then manually enabling Low Power Mode and keeping it on can be a good idea. You may notice some minor differences in the way your iPhone behaves, but it’s likely that the trade off is preferable to running out of battery.