Installing All Prereqs on Self-Hosted Runners

I am trying to create (say a Linux) a self hosted runner. Although, we can get the configuration steps from GitHub repo itself, it is only going to create a connection between my runner and GitHub. However, I want to install all the prerequisites that a GitHub Hosted runner would have, on my Self Hosted runner. Use cases would be to reduce cost, better troubleshooting, caching of Docker layers etc. Anyways, I found a link Linux Virtual Environments, which has a lot of scripts, probably targeting an Azure VM. Also, there is not enough documentation on how or in what order to run these scripts on our own so that we can also create a Self Hosted Linux runner. Has anyone done anything like this? If so, please help. I want to create an exact replica (with prerequisites) of a GitHub Hosted Linux runner at my end. Let’s say I have an Ubuntu 20.04 LTS. I want to install all the software mentioned in the below link (which is what is present in a GitHub Hosted Ubuntu 20.04 runner).