A web server that refuses to start with a message like key values mismatch usually got the wrong key file. Two commands with OpenSSL tell you which files go together.
Hash the public key from the certificate and the public key from the private key:
openssl x509 -in site.pem -noout -pubkey | openssl sha256
openssl pkey -in site.key -pubout | openssl sha256
If both hashes are the same, the key belongs to the certificate. If not, look for another key file. A CSR has the same public key too, so openssl req -in site.csr -noout -pubkey | openssl sha256 joins the comparison when you have a pile of files from an older renewal.
Older guides compare -modulus output instead. That only works for RSA keys. Comparing the whole public key works for RSA, EC and Ed25519 alike, which is why I prefer it.
The private key never leaves your machine here, and only its public half is printed and hashed, so the output is safe to paste in a ticket. Still, run it on the server itself and do not copy the key around to compare it somewhere else. If the key has a passphrase, pkey asks for it first.
Further reading: OpenSSL: openssl-pkey, OpenSSL: openssl-x509
Going deeper: Run degoog on Unraid as your own search page, compared with SearXNG and 4get