A Mac is unix-like on its own so a lot of Linux tools work directly on MacOS without the need for anything like WSL. If you want an actual Linux environment though, then yes you need to use Virtualbox or Docker.
Mac is Unix under the hood, so you can do a lot of stuff natively. I do Python development and can do most things 1:1 the same on Mac and deploy on Linux. But if you use a compiled language there is more friction of course.