You should consider where you will ride when you purchase tires and tubes. I live in Wisconsin during the summer and Arizona in the winter. I thought I would have more flats in Arizona because of cacti. True, but construction debris is everywhere, especially in bike lanes adjacent to vehicle traffic lanes. Most every sharp little object migrates to the side of the road.
Fixing a flat is not a lot of fun. Be sure to practice taking the tires off at home to ensure you will have the necessary set of tools and paraphernalia to do the job on the trail. Check your tire pressure every few weeks.
Consider adding Slime or similar product to your tubes. Be sure to carry a pump. Even with Slime, some air can leak out before the hole is filled. If you have Presta valves, carry the little screw-on adapter. Very necessary if you use the air hoses at gas stations.
Consider tires with some type of hard case and/or puncture resistance. If you have rims that are tubeless capable, consider tubeless tires. Yes, more expensive. But well worth it vs. one inconvenient flat.
6 flats this year taught me a few lessons.