Browsers remember the Strict-Transport-Security header and never use plain HTTP for that site again. curl ignores the header by default, but --hsts gives it the same memory.
Point the option at a cache file. curl reads it before the transfer and saves it again afterwards:
curl --hsts ~/.curl-hsts https://example.com/
curl --hsts ~/.curl-hsts http://example.com/
The first request is over HTTPS, and if the response contains an HSTS header, the host goes into the file with an expiry date. The second command asks for http://, but curl now upgrades it to https:// before it connects, so nothing goes out unencrypted. The file is plain text with one host and date per line, and you can read it.
I like putting hsts = "~/.curl-hsts" in ~/.curlrc, so old http:// links in notes and scripts get the same protection a browser would give.
It only protects you after the first visit over HTTPS, since curl has to see the header once. Sites on the browser preload list get no special treatment, because curl does not ship that list. Each entry also expires after the max-age the site set. An empty file name, --hsts "", keeps the cache in memory for one command only. The option needs curl 7.74 or newer.
Further reading: curl man page, curl docs: HSTS
Going deeper: Run degoog on Unraid as your own search page, compared with SearXNG and 4get