Check below link maybe that'll help you:
And create a module as per the instruction.
This will Import a category with its subcategories programmatically.
I also suggest you to remove/disable this module once you have successfully imported category.
Default location is
and do not include the path before the filename in the CSV data.
Starting with the Magento 2.3.2 release, the path specified in the
Images File Directory concatenates for import to the images base
directory - /var/import/images. For earlier
Magento releases, you can use a different folder on the Magento