If you want your website to have a *valid* certificate which web browsers trust, then you shouldn't use openssl: you should use
letsencrypt, using a client program such as certbot, dehydrated, acme.sh. Letsencrypt has plenty of getting started guides, plus its own
forum where you can ask questions about this.
This will create two files: a private key, and a certificate chain. You would then refer to these using
tls_server_config in a separate config file that you point to with --web.config.file.
tls_config is used when prometheus itself is making *outbound* https connections - for example when scraping an exporter or talking to an API for service discovery - so isn't relevant here.