I followed the instructions here:
https://www.prestashopmanager.com/useful-articles/how-to/how-to-export-prestashop-attribute-combinations/ and https://www.prestashopmanager.com/useful-articles/tips-tricks/tips-on-how-to-import-prestashop-attributes/
You first need to input the attributes manually in the new store, so eg Color (red, blue, green). I also entered the categories manually. But after that you can export all the products from the old store and then import them into the new store.
Make sure the tax settings are the same, too, if you import with prices.