You can absolutely import data directly from Shopify to Magento 2 via API. You should find a reliable automated migration tool to help you complete the migration process successfully, to clarify, transfer all data including products, customers, orders and other related data from your old store on Shopify to the new one on Magento2, without interrupting your current store performance.
If you have some technical skills, you can try this solution: export data on your Shopify store as CSV files then import manually those CSV files to Magento 2. However, this way will take you a lot of time and effort. You need to be careful during the migration process because there are many differences in structure between 2 platforms, so there might be some expected issues.