I've never used Lightsail. But from what I read, it runs on the same platform as EC2 and is just a stripped down version of it. If you DO use Lightsail, you would want to make sure to choose just the Amazon Linux 2 OS template (not a LAMP instance) if you're going to use the script above. If you're going to use one of their LAMP stacks, you will want to need to confirm it meets all of the system requirements as I don't know if it has all of the required PHP modules.
If you're not familiar with SSH, I would suggest Google for some tutorials and videos. There are plenty out there. I don't know what OS you're using, but the following guide has some info:
https://www.clickittech.com/aws/connect-ec2-instance-using-ssh/
Also there is no such thing as just "hosting" on Amazon. If you're not comfortable managing a web server, database server, etc... you're most likely better off not using AWS. There is no technical support and if/when something goes wrong... you're on your own.
For example changing from PHP7 to PHP8... if you don't know what you're doing and how to upgrade it, how are you going to maintain it long term?
If you don't know anything about managing servers, SSH, FTP, etc... you might want to consider having IPS host it for you with one of their cloud offerings.