How would I create a PKCS12 file from this?
openssl pkcs12 -export -inkey keyfile.pem -nocerts -out p12file [-passout ...]
will create A PKCS12 file -- i.e. a file complying with the PKCS12 document.
However, you will probably be unable to use this PKCS12 file for anything expect maybe printing it out and admiring it, for at least 2 and possibly 3 reasons:
PFX/PKCS12 was created and is usually implemented to carry a privatekey and matching X.509 (in practice usually PKIX) certificate, and optionally chain cert(s). The PKCS12 document does not require this, and allows the creation of a file with only (a keybag containing) a privatekey, which that OpenSSL command does, but most other software won't read such a file
your EC key defines the curve with explicit parameters rather than the 'named' form (which actually uses an ASN.1 OID). Originally X9 defined both explicit and named forms, but in practice almost nobody implemented explicit; OpenSSL is a rare exception, perhaps because it dates back to well before 2000. RFC5480 prohibits explicit form for PKIX certificates since 2009, and although a privatekey is not a cert most implementations will be consistent.
there are numerous options for encrypting the privatekey in PKCS12, and protecting (MAC-ing) the file, and different programs and systems can support different ones. In particular older versions of OpenSSL default to the 'traditional' PBEwithSHA1and3KeyTripleDES for keybag, PBEwithSHA1andRC2-40 for certbag if present which it isn't in the case above, and Appendix A's PBHMAC with SHA1, while 3.0.0 up defaults to PBES2/PBKDF2-HMAC-SHA256/AES-256-CBC for both bags and PBHMAC with SHA256. Some software may handle the former but not the latter; some (especially if intended to satisfy FIPS140) may accept the latter but not the former. This part of the problem is usually solvable because OpenSSL has options (see the man page) to select other algorithms (including some I don't think anybody else implements and thus pretty useless), assuming you can accurately determine the constraints or requirements of (all) the system(s) or program(s) where you want to use the file.