Your iPad will suffer no ill effects whatsoever through being connected to - and used - while connected to its Power Adapter or other source of external power. If using an external monitor using a USB-C PD (Power Delivery) or Thunderbolt connection, the Monitor itself is very likely to be providing power to the iPad.
Using the iPad while connected to external power offers significant advantages - as, in regularly using external power, you will reduce the overall need to recharge the battery. While architecturally the load is shared by the battery and external power source, the iPad will use only external power after the battery has reached its configured maximum charge. This reduces the need to recharge - and ensures that the iPad is optimally charged and can offer maximum battery autonomy when needed.
Ultimately, the number of recharge cycles will be the limiting factor for overall battery life.
It is perhaps worthwhile to note that while using external power, your iPad will automatically regulate and optimise charging - and will not overcharge the battery. When used in kiosk applications - where external power is connected for extended periods of time - the iPad may modify its charging strategy and limit battery charge to ~80% of maximum. This modified charging strategy is designed to reduce chemical ageing that might otherwise occur if 100% charge is maintained at all times. Nominal 100% charging will be restored when a normal charge/discharge routine is restored.
More information about iPad’s battery management can be found here:
About iPad and iPhone Charge Management Feature – Apple Support
An iPad's battery is rated to retain at least 80% of its original capacity after 1000 full charge cycles - one full cycle being any combination of charging that together sums to 100% (e.g. 50 + 25 + 15 + 10 = 100 = 1 cycle). Simple arithmetic would therefore suggest that battery health will decline at about 1% for each 50 charge cycles.
Studies have demonstrated that restricting charging to only 80% of maximum has little if any impact upon the overall longevity of the iPad's battery. This feature does have potential benefit where the iPad is connected to external power for extended periods such as when being used in retail or kiosk applications.
Speaking personally, I keep my iPad connected to external power (powered from my Apple Studio Display) whenever I am at my desk and the iPad is in active use - remaining connected for +10 hours a day. As the iPad's ultimate battery life is principally determined by the number of full charge cycles, minimising the number of charging cycles helps to extend the usable lifespan of the iPad's battery.