Q.Tomato and squash plants die
After starting to produce, the plant dies from bottom up
Certified GKH Gardening Expert
This sounds typical of magnesium, calcium, phosphorus, and potassium deficiencies.
I recommend adding a HANDFUL of DOLOMITIC LIME per plant, and adding a bloom booster at half strength.
You can also amend your soil with compost, and dolomtic lime. This will have a similar affect.
If you can include photos, then I can rule out fungal infection, and conclude what is going on here.
In the meantime, this article will help you to grow tomatoes properly: https://www.gardeningknowhow.com/edible/vegetables/tomato/growing-tomatoes-guide.htm