Most websites, yes. Browser-based games generally work fine on a Mac since they don't care what's underneath.
Downloadable games are the problem. Many are Windows-only, so you'll need either a version ported specifically for macOS or a compatibility layer like Wine or a virtual machine running Windows.
Checking the system requirements before buying saves a lot of frustration.