the simplest tool to manage “local” develoment with multiple projects with “sometimes” different languages? [closed]

i work with different projects (front-end “vuejs and other frameworks” and backend “for example laravel APIs projects”) some of them are old projects working with older versions of a specific language (php for example in case of laravel) and i found my self always struggling to make the project work (making sure i have the same version of the language the project is developed with. and config terminal to use that version of the language)… is there an easy way to manage this problem.. i have used nvm (node version manager) for node projects but sometimes forget to change the version of node and cause some problem.. what the best solution for local dev in genral ? i researched about docker and most of the resources is talking about deployment and deployment is not my concern because my servers environment is not always changing, but my local environment on the other hand is always changing (os changing.. distro hopping..) i want a clean way for this problem.
i want a lightweight dev env for any project i have that is easy to config and lives with the projct when i push projects to git for example so i can re genreate the env again when ever i clone the project again