You mean something like repl.it? Or GitHub Codespaces? Or AWS Cloud9? You can find many virtual dev environments, most with a free tier.
For a few dollars a month you can run an instance of your own at Digital Ocean, AWS, Google Cloud, etc. Some cloud providers have free tiers as well.