Actually, the way to transfer the data would be using some third-party apps that will help you with functionality as well as with guides and all the support the human can give you should you have any problems or either just need assistance.
There are many apps however I would suggest using Business Importer for Desktop app on the Appstore of desktop apps.
If you already have data in csv/excel files then you can upload that data, do the mapping and the data will be transferred into your QuickBooks Desktop company. However, if you don't have that data on your hands then there is a need to export the data first. You can use vanilla QuickBooks Online for this, however, sometimes it is better to use the third-party apps for this in order to get the proper organization of your export file which will become the input file later. The same app for this is practically helpful. E.g. Business Importer for Online can be used for exporting and then importing it by using Business Importer for Desktop, however, please note, both are different products and need different subscriptions to have purchased.
In general, that would be it. A bit costly solution - could be around $100-200 - however, you will get instrumentary for exporting/importing data for the future as well as the experience and assurance that everything is done correctly.