My guess would be squash vine borer. If the stem at soil line looks like it is cracked woody etc and looks like there is some type or frass coming out more than likely it is borer. Once this happens not much can be done to cure it. You could still plant squash for late season harvest if you want. To protect the stem from borer damage start spraying the stemwith Sevin when the plant is about the size of a dinner plate. repeat in 7-10 days and it should protect the stem from borer damage.