This VM image ships NGINX 1.28 mainline with Certbot pre-installed.
A self-signed fallback certificate is in place so https:// responds
while you wait for DNS to propagate.
sudo certbot --nginx -d your-fqdn.example.com.
Full walk-through at
cloudimg.co.uk/guides/nginx-with-ssl-certbot-on-ubuntu-24-04-azure.
Image by cloudimg. Support: support@cloudimg.co.uk.