It’s important for the security and performance …
The “Strict-Transport-Security” HTTP header is not configured to at least “15552000” seconds. For enhanced security we recommend enabling HSTS as described in our security tips.
a2enmod is a command,
a2 like apache 2
en like enable
Mod like module
You should learn a little bit how Apache2 works and where are key files and how they work. Knowing that will be a great help for using nextcloud.
Because Apache2 is a web server, you can have multiple websites running on a single server. Every website rely on a .conf file saying : what is my name, what is my alias, where is my root folder etc…
In brief, for nextcloud if you want to master all of this you need knowledge on web server (apache2 or ngnix), database (mysql mariadb or postgresql) and Php