This gist contains a list of basic steps to harden Ubuntu (20.04 and above) that I use in projects. It is based on https://gist.github.com/lokhman/cc716d2e2d373dd696b2d9264c0287a3 and has been stripped by a few aspects that are not required in my projects.
Use on your own risk!
Keeping the system updated is vital before starting anything on your system. This will prevent people to use known vulnerabilities to enter in your system.