your title says you want The macBook Pro desktop to appear on the M4 display.
That is accomplished by enabling Screen Sharing on the 2014 MacBook Pro, then asking from the M4 Mac to make a screen-sharing connection. The Screen of the MacBook Pro will appear in a window on the M4 Mac:
Turn Mac screen sharing on or off - Apple Support
--------
the first line talks about connecting to the MacBook Pro "as a drive".
That is accomplished by enabling File Sharing on the older Mac, the making connection to that computer with Finder on the newer M4 Mac. the old computer will appear as a network device, similar to a drive.
Set up file sharing on Mac - Apple Support
--------
Macs are widely network-compatible across older and newer versions of MacOS.
In each case, the credentials required will be the credentials required to log in on the REMOTE computer, even though the dialog-box appears on the local computer. Remember that a user with the same name on a different Mac is NOT the same account.
========
There is also a way to make another Mac literally appear as a drive on another Mac, by invoking Target Disk Mode:
Transfer files between two Mac computers using target disk mode - Apple Support