You may not be doing anything wrong.
If the yellowing is to the leaves closest to the base of the plant these are the oldest leaves and may be dying naturally. Newer leaves should keep appearing from the top or end of the plants.
Some small squash will get wilty looking, soggy, and start to turn brown. That is usally a sign that the blossom wasn't pollinated and those fruit are dying a natural death. Only blossoms that are pollinated will give fruit that will grow properly. All squash will loose dome fruit as the male and female flowers do not always appear at the same time and therefore all the female flowers do not get polinated.