It starts before you do the laundry. It starts when you buy clothes, sheets etc. Only buy where possible materials in natural fibre. Micro plastic from artificial materials is washed out of the material and ends up in the environment.
The contribution of washing processes of synthetic clothes to microplastic pollution
Then when you next buy a detergent, check the ingredients and buy the least harmful you can for the environment.
Wash in cold water to save the energy needed to heat the water, unless the water is solar heated. Then you can use hot water, as that’s no worse than cold. Depending where you live and your water supply source and how much is available, you might need to consider the amount of water used.
If you buy a washing machine, look at the actual numbers for energy efficiency, not the stars, as the stars are based on a hot wash (for front loaders at least), not a cold wash. At least that’s how it is in Australia. Check the numbers for a cold wash, if you can find them. Front loaders often only display the hot water figures. I was surprised to find on a cold wash front loaders (when I could actually find the cold water figures for front loaders) were not as energy wise efficient as some top loaders. Front loaders use less water and less energy on a hot wash, but on a cold wash they can be less energy efficient than some top loaders. Likely because front loaders take longer to wash than top loaders, and the longer time takes energy. That’s why ignore the stars and check the numbers for cold water.
Then hang the clothes on the clothesline, or hang them inside. Don’t use a dryer. Work with the weather and be flexible with the day you wash.