If you have contacts in iCloud (which you probably do if you've been using iOS devices or a Mac computer), you can export any number of selected contacts. The instructions for how to select all and export them can be found in this Apple support article. After the export, you should have a file ending in ".vcf" that is a text format containing VCard items for each contact you selected.
If your contacts are on a Mac computer but not synchronized to iCloud, you can still get to the point of having a VCF file containing interoperable VCard data. From the Contact app on your Mac, multiselect individual contacts or create a list and sort into it the contacts you'd like to port. Then when you have the individual items selected, right-click them and choose "Export vCard". This process will also create a .VCF file containing vCard items.
Note that if you follow the instructions to create a "Contacts Archive" from your Contacts app, you will have a format that is less portable (an .abbu file). This may be useful as a backup or for copying from one Apple machine to another, but less useful for porting to another destination.
A ".vcf" file (generated with either approach above that results in that file format and file extension) can now be imported to a number of other systems.
This solution is good for migrating one-time to another platform, or bring your data with you one-time (e.g. when you need all your old iOS contacts available to your work email and your work uses Google or Microsoft mail.
This solution is not good for re-importing. If you try to re-import, it will simply create duplicates, and that may create confusion about which contact is the more recent.
The source code (markdown) for this article can be found on GitHub.