A private key on a laptop or in a backup should have a passphrase. A key that nginx loads at boot usually cannot have one. openssl pkey switches between the two.
Add a passphrase; OpenSSL prompts for it twice:
openssl pkey -in site.key -aes256 -out site-enc.key
The new file starts with BEGIN ENCRYPTED PRIVATE KEY. To take the passphrase off again, read the encrypted key without a cipher option:
openssl pkey -in site-enc.key -out site.key
chmod 600 site.key
This works the same for RSA, EC and Ed25519 keys, which is why I prefer pkey over the older rsa command for this job.
My advice is to keep the encrypted copy in backups and only put the plain key on the server that needs it. A plain key file is only protected by file permissions, so check those after every copy.
Avoid putting the passphrase on the command line with -passout pass:.... It ends up in shell history and is visible in the process list while the command runs. If a script really needs it, -passin file:path or env:VAR are better. And keep the passphrase somewhere safe: without it the encrypted key is useless, and nobody can recover it for you.
Further reading: OpenSSL: openssl-pkey, OpenSSL: passphrase options