Everytime I want to install another vps with ubuntu as main OS, I have to run a long list of terminal commands in order to setup my server as I wnat it to

I want to automate this process, is there any way I can create a script or .deb file or something...

please help
I am an absolute newbie but not afraid of terminal commands

thanks