I have successfully followed the instructions in the
https://github.com/p4lang/tutorials repository, in particular the directory of that repo named vm-ubuntu-20.04, on several systems:
+ Windows 10 + VirtualBox 6.1 and later
+ Windows 11 + VirtualBox 6.1 and later
+ macOS 12.6.x + VirtualBox 6.1 and later
+ some earlier versions of macOS, I do not recall exactly how far back, but since about 2019 or so
I have never tried to follow those instructions on a Windows system with WSL installed. I have no idea whether there are issues with trying that or not.
Andy