Algae will take advantage of nutrient imbalances within the tank. Lots of live plants will out compete the algae for food. You'll always have some, but a heavily planted tank will take a lot longer to get algae than a tank with no plants.
I like algae. I leave it on the back of the tank & just clean the front so I can see in lol. It makes the tank look mature & lived in. I don't like shiny brand new looking set ups.
Snails love algae, but they don't clean it off properly & leave little whilry marks behind where they've been grazing.
If you're really desperate or have a specific need to address the algae, there are things you can do to slow its growth...
Invest in a phosphate test for your tank. Some types of algae love phosphates & will go mad no matter how many live plants you have.
Reduce the lighting period & have the lights on a timer set for one period of about 8 hours per day. Try not to position the tank where it will get direct sunlight. That's not always easy, but it will help.
Reduce the amount of food you are feeding your fish, excess & decaying food will cause spikes in NH3/NO2 & phosphates which the algae will love you for.
Keep on top of your water parameters & carry out weekly 25% changes.
Or you can just accept it as part of the tank & keep on top of cleaning it from the glass.