A certificate that quietly expires is one of the most avoidable outages I know of. You can check any HTTPS site from the terminal in one line.
echo | openssl s_client -connect example.com:443 -servername example.com 2>/dev/null | openssl x509 -noout -dates
It prints notBefore and notAfter, the period the certificate is valid. -servername matters: without it a server with several sites can hand you the certificate of a different one.
For a script, add -checkend 604800 to the x509 part. It exits with an error when the certificate expires within the next 7 days (604800 seconds), so a cron job can warn you.
Caveat: this checks the certificate the server presents on that port, not what a reverse proxy in front of it might serve on another one.
Further reading: openssl s_client
Going deeper: Run degoog on Unraid as your own search page, compared with SearXNG and 4get