If you're playing A Hat in Time via Steam
Your save data should be automatically backed up in Steam Cloud. Just install and play A Hat in Time on any other device on the same Steam account and your save data should be transferred.
If you're playing A Hat in Time via GoG
Navigate to HatInTime/HatInTimeGame/SaveData and copy the files to your new installation.