How can I make a "local" mywebsite.test on a remote server work with SSL from my local computer?

Solution 1:

Get the certificate file (you call it "mkcert certificate" but even better name would be a "self-signed certificate"). Then add that file to your Mac so that it becomes trusted (that is, trusted to secure the https connections). There are many answers on superuser.com about how to do that, for example this thread.

If you'd like to use mkcert for that task, they briefly touch that in their readme.

And, make sure your laptop resolves the name mywebsite.test to the correct IP address, which is routable from your laptop. If it isn't routable, you could work around it by using one, two or twelve ssh tunnels.