How do you get stains out of white clothes?

I’m afraid to buy white clothes because of staining them, but there’s this dress I really want that only comes in white, and have never seen anything like it. It’s $100, which is way more than I’ll ever spend on a dress, so I want to take care of it. Its 80% linen, 20% Cotten, if I stain it what should I use?