In a lot of projects, this is usually done via README. It tells you what running dependencies to install and how to run certain commands.
This can get harder to maintain as things change, the project grows, and complexity increases.
I see two parts to automate here: actually setting up the environment, and running the application or orchestrating multiple apps.
How do you address this?
Which programming language(s) do you have in mind? Many already have built-in support for this (Go, Rust, Nim), while others have external tools you could use (Python->Poetry). Otherwise, if you want a “fast” (easy to understand) solution, a shell-script might be a fine solution.
If you want some real power, you could use the nix package manager (as already stated by other comments). It’s easy to install, but you need to learn how to use it, and with that you can easily share dev environments.