I use my iPad as a second screen on my macbook air with Duet [0]
Had the software for a few years now and it’s used very frequently. I don’t know if using the app hardwired requires a subscription though as mine was a one-off purchase via App Store.
Iirc modern-ish MacOS versions (and iPadOS/iOS) allow this feature out of the box?
I'm pretty sure I used it once or twice when I had my old smaller macbook from work.