OpenSSL is a framework which implements the secure socket layer. It ships with a program/library which gives you access to all those functions.

mkcert is described as 'Using certificates from real certificate authorities (CAs) for development can be dangerous or impossible (for hosts like example.test, localhost or 127.0.0.1), but self-signed certificates cause trust errors' and is an app. There are 1 alternatives to mkcert for Mac, Windows, Linux, BSD and Haiku. The best mkcert alternative is OpenSSL, which is both free and Open Source.
OpenSSL is a framework which implements the secure socket layer. It ships with a program/library which gives you access to all those functions.
