One certificate can carry many names, for example example.com, www.example.com and cloud.example.com. Browsers have checked only the SAN list for years; the Common Name (CN) is ignored. A certificate whose name appears only in the CN is treated as invalid.
Wildcards such as *.example.com cover exactly one label: cloud.example.com yes, example.com and a.b.example.com no. That is why the apex is usually added as an extra SAN.
Typical mistake: a new hostname is added in DNS and the web server, but the certificate is not reissued. The browser then reports NET::ERR_CERT_COMMON_NAME_INVALID.
Example
openssl x509 -in fullchain.pem -noout -ext subjectAltName