Using Apple tools like Sidecar makes this almost trivially easy from a software perspective, although setting up the iPad as the only screen, rather than an auxiliary screen, on the MacBook did ...
Results that may be inaccessible to you are currently showing.