An iPad Pro can be used with a compatible Mac to extend the Mac display to the iPad using the Catalina/iPadOS Sidecar feature.
https://support.apple.com/en-gb/HT210380#systemrequirements
An alternative third-party product, Duet, can be used to extend a PC or Mac to an iPad:
https://www.duetdisplay.com/
It isn’t possible to do the reverse, i.e., extend the iPad display to another computer. You can, however, use iPad’s mirroring function to display a replica of the iPad screen on a TV or external monitor - using either AirPlay or over an HDMI connection.
One other product that might be of interest to you is Reflector3:
https://www.airsquirrels.com/reflector
I hope you find this information and clarification to be helpful.