How do I enable the strapi app after restarting the server?

the easiest way is to use pm2:

For Startup script:

You should also learn a little bit about ubuntu, systemd and nodejs.
But there are plenty of options out there.