I think in one org you didn't have it enabled, it's something that must be turned on in setup.
The custom settings metadata can be retrieved or deployed just like any other metadata.
All you need is name of the custom setting
If you are working in orgs that cannot have source tracking enabled
sfdx force:source:retrieve -m CustomObject:<Customsettingname__c>
If you are using source tracked orgs use
If you want data within ...
In your test method, you can create new records in custom setting, just as will create test data for other standard/custom object.
At the beginning of your test method, insert a new record of custom setting (Api will be like: < MyCustomSetting >__c), populate the fields values as per the method you are testing, and it will work.
Do not use seeAllData=...