First, I agree with the many comments about your washing machine; it may be the problem. As for stains, I never wash them in hot water first. Hot water can set some stains, so I do a cold wash first with extra detergent and extra rinses.
For stubborn stains, I pour liquid laundry detergent directly on the stained areas and let it sit for a while before washing. That step alone will usually do the trick.
If you are washing white cotton, you can use bleach with either the hot or cold wash. Donāt bleach any fabrics other than white cotten or linen.