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!
http://bookofzeus.com/harden-ubuntu/initial-setup/system-updates/
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.