Allow user to SSH to my Mac, but sandbox the account
Secure Shell (ssh) Jail

The phrase you need to search for is jail ssh user.

See the questions and articles linked below for a range of approaches; being Unix-y, these approaches should also work on macOS:


Restrict SSH User Access to Certain Directory Using Chrooted Jail
Simple &amp; easy way to jail users
Jail user in SFTP + SSH