Every time I make bread and put it in a ziplock or plastic wrap it goes moldy in 3-4 days. Does anyone know what I can put in it to make it last as long as store bought bread?
Your enemy is moisture. Due to the airtight plastic, moisture will gather on the surface of the bread, which is the happy place for mold.
If you don't store your bread in plastic wrap, you won't get mold.
Yes, now you face the opposite problem - as the moisture is no longer stopped, you end up with hard bread, instead of moldy bread.
So you want to control the environment of the bread that too much moisture can't assemble, at least not on the surface of the bread, still moisture escapes as slowly as possible. That's what breadboxes are for - usually. Unfortunately, these days you can get breadboxes that are as air tight as plastic wrap.
Okay, the good advice would be to get a decent breadbox or clay pot, as clay also regulates moisture.
What can you add to your dough?
Two tablespoons of vinegar. Note that this won't buy you as much time as proper storage.
The last option, for completeness, would be to get moisture absorbing silica gel packets. They are available with FDA approval for food products and you can put some together with your bread.
You can gain some extra life for your bread by adding vegetable/olive oil. If I make a very simple bread with flour/water/yeast/salt it will go stale within 2-3 days. If I add just 2 tablespoons of oil to the mixture, it will still be moist after 4 days. That won't solve the mold problems, but at least you won't need to wrap it up so much.
I typically freeze all the bread that I won't eat the same day. Frozen/thawed bread is not as nice as fresh bread, but definitely better than stale (or moldy) bread.
Instead of thawing it in the microwave, pop it in the oven for five minutes! (Or, depending on the shape/size of the bread, microwave for a couple of minutes while the oven warms up, then put the bread in it to get some crust back.)