How to run software in sandbox mode?

Is it possible to run untrusted software in a kind of container/sandbox?

I'm new to MacOS, I saw this https://paolozaino.wordpress.com/2015/08/04/how-to-run-your-applications-in-a-mac-os-x-sandbox-to-enhance-security/ but would like to have something as simple as right click > execute in sandbox.

I'd also like to run pkg files in this sandbox mode. Is there something like this on MacOS? On Linux I'd just create a Docker container and run there with volume passtrough everything I need.