Picture this, you are on a road trip and you notice that there are some annoying lines on your windshield. At the next gas stop you go to clean the glass to get rid of these lines, but they don't move at all, and you then realize that these are considerably deep scratches. Later on the road trip, the sun goes down and it starts to rain, but even with your wipers, it's almost impossible to see through the rain on the windshield.
Both of these issues are related and can EASILY be prevented.
The surface of a windshield is no different than any other surface on your car. When I say this, I mean that un-necessary wear and tear will destroy the windshield. However, unlike your cars paint, which can technically go to ruins without dire consequences to your health, this windshield issue is all about your safety. God forbid there's another natural disaster (tornado, wildfire, etc) and in evacuating, you can't see anything because of this easily preventable windshield damage.
That said, the first step to preventing these window scratches is to build the proper habits. Don't use your windshield wipers UNLESS ABSOLUTELY NECESSARY, notice how these scratches are usually following the motion of windshield wipers. This is because debris are picked up and dragged along the glass by the wipers, scratching the glass, creating groves over time which only get bigger and worse if not addressed. So only use your wipers when needed, and at the slowest setting that will help for the given conditions. Further, the excess use of your wipers can build up rubber deposits on your windshield, leaving behind spots peppered through the windshield, visible in the night.
Look into glass protection options, I personally recommend to start with a glass ceramic coating, but anything is better than nothing, Rain-X, Car wax, Polymer coating, all of these will work better than not having anything at all. Also, make sure to check your wipers often and replace them when necessary.
Window scratches (non-windshield)
Most of the time that I see scratched windows, it's repairable by replacing old tint. However, sometimes the scratches can be on the outside of the window causing the same issues mentioned in the above windshield portion of the page. Both scenarios are repairable.
Usually, the cause of both types of window streak is from improper cleaning intervals, allowing dirt to get trapped at the seam of the window, scratching it when the window is rolled down. To prevent this, don't allow your car to go a long time between washes and interior cleaning.