If the Linux and Mac are on the same network subnet, you could install a Virtual Network Computing (VNC) application on Linux that uses port 5900 and on the M4 MacBook Pro, use Apple's Screen Sharing application to make the VNC connection. It should then be a simple case of dragging and dropping files between the Linux Mint screen and your M4 Mac filesystem in either direction.
I use screen sharing on the Mac to display the screen from my 2020 Core i7 iMac on the 32-in display of my M4 Mac Mini Pro. Apple's Screen Sharing application is found in /System/Library/CoreServices/Applications and I simply dragged and dropped it on my Dock for easier access.