Put the headers in /etc/nginx/sites-enabled/default and the SSL config in /etc/nginx/nginx.conf and /etc/letsencrypt/options-ssl-nginx.conf
APT96/Nginx-Security-Configs
Configuration to get your Nginx web server an A+ rating on SSL Labs and SecurityHeaders