Punctures are a part of cycling - you'll never eliminate them completely.
You get a puncture because something has pierced your innertube. That might be loose objects on the roadway (glass, wire, nails) or the roadway itself (sharp pothole edges) or even your own bike's wheel rims.
There are two avenues to minimisation.
Look at your tyre - is it worn down in the middle? Most tyres work fine with no tread pattern, but if your main tread is thin then it offers reduced protection. Consider buying new tyres.
If you're in the market for tyres anyway, look at those offering Kevlar/aramid breakers or belts. Often marketed as commuter tyres, they have an extra layer of armour under the tread to reduce penetration. Note they offer no protection on the sidewalls (but sidewall punctures are rare) They're also thought to have higher rolling resistance. Schwalbe Marathon Plus would be one brand, but there are many others.
You can get similar protection without replacing the tyre by adding tyre liners. These are plastic shells that fit inside the tyre and shield the tube all the way around the wheel. Downside is added weight.
Sealant can also prevent punctures. Originally from the tubeless tyre, a bit of liquid latex inside your tube can help seal small holes. Downside this stuff only lasts about 6 months before it needs topping up, so you need a tube valve with a removeable core.
Think about where you ride - main roads are fast and direct but the high traffic levels tend to sweep the road with air gusts, pushing detritus into the sides of the road.
If you ride through these areas you're much more likely to run across small sharp objects. So change your route to avoid these dirty areas. Remember bikes can go slightly further easier, and there are bike paths etc.
Pinch flats are when the tyre is low on air, and an obstruction crushes through the tube into the rim, puncturing the tube with a characteristic two small holes. This is called a snake bite puncture, and can dent/crack your rim if there's enough force.
To avoid pinch flats, start by adding more air to your tube. It depends on the width of the tyre, but thin tyres could be 80-100 PSI or thick ones could be 30-60 PSI.
Second part of avoiding pinch flats is technique where you don't bulldoze your way through anything in your path. Instead you dodge potholes, or bunny hop over them, or merely learn to "unweight" the bike as you touch an obstruction. This means to get off the saddle and slightly lift the bike as you roll over things. That way there's less pressure on your wheel for the instant it is not on flat pavement.
One final help is to minimise the amount of weight on the bike. I started at 110 kg and now am down to 95 kg, and my flats have dropped to ~3 a year when they were almost weekly to begin with. You can also carry less/lighter stuff rather than heavier tools/pump etc.
tl:dr minimise and avoid, but can never eliminate completely.