This article explains how to use an iPad as a second monitor for your Mac with Sidecar. Instructions apply to iPadOS 15 and later, and macOS Monterey (12) and later.
How to Use Your iPad as a Second Monitor (on Windows and Mac)
Sidecar is built into many Macs and iPads. Here's how to use it to use your iPad as a second monitor for your Mac.
Open System Settings (or System Preferences) on your Mac from the Apple menu or the Dock.
Select the + (Plus) or Add Display and choose your iPad from the Mirror or Extend options.