So, now your site is up and running you’ll want to get a few things installed on it as a base. for me I like to enable things like Multifactor Authentication, the use of FIDO2 or Passkeys to secure my user account, but also I like to install things like WP Mail SMTP and Big File Uploads as a starter for 10. but in order to install plugins seamlessly from within your selfhosted WordPress you will need to run:
sudo chown -R www-data:www-data /var/www
This will then allow you install plugins directly from the WordPress dashboard without being requested for FTP details.
WP Mail SMTP is a great plugin to enable your site to send emails. However, if you want to send emails from the CLI in Ubuntu using Postfix and mail utils you will need to configure that.
For both Postfix and WP Mail SMTP I would recommend singing up to SendGrid, there are different plans, including a free plan: Pricing and Plans | SendGrid. Once signed up you can then create API Keys to use with both those services.