Best way would be to export the contacts from outlook and then import to nextcloud. If the contact app doesn’t support the export-format, you can also use any carddav-application that can import the outlook exported file and connect it to your nextcloud account.
A very simple way that worked like a charm for me was to install CalDAV synchronizer in Outlook (https://github.com/aluxnimm/outlookcaldavsynchronizer/releases). Then, you can create a synchronization profile which links the existing contacts folder in Outlook to an address book in Nextcloud (this must be created separately). When the first synchronization is completed, you can shut down Outlook, everything is in your cloud
By the way, this solution does work as well for migrating your calendars.