This is highly variable depending on the material. For example, if the textile is made from oil-based materials (i.e. plastics), disposing it improperly might accelerate the microplastics problem in oceans. You could:
- Burn it, to offset other fossil fuel uses, preferably in a large commercial waste incinerator
- Bury it underground in a landfill, to make it the fossil fuel reserves of the future and sequester the carbon
- Recycle it, hoping it will find find some useful use
Cotton also contains carbon, has an energy content and can be recycled, so the options and their impacts are the same. This time, however, cotton doesn't accelerate the microplastics problem. On the other hand, cotton has a large water footprint, so if you believe water scarcity is a major problem, you could recycle it, hoping less new cotton will be produced and less water will be used to do that.
I don't know what the EROEI of cotton is; if it's low you should consider ideally other options than burning because it doesn't make sense to use materials having poor EROEI as an energy source. Low EROEI materals should be ideally recycled; high EROEI materials can usefully be burned to energy to offset other fossil fuel uses.