As long as the power adapter you are using can supply enough power to the iPhone to sustain whatever it is you are doing, it will not use the battery.
But if you are using an old 5-watt USB power adapter and the phone is drawing 7 watts for instance, then it will draw from the battery.
As long as you are using an 18-watt or better power adapter, the phone should have sufficient power to run pretty much anything you might be doing.
The iPhone 16 series devices will draw up to 45 watts of power - provided you are using at least a 45-watt adapter - to charge and power the device as you use it.