A bright windowsill does not provide enough light for many plants and neither do lamps that are not close enough to the planting tray. You will need to get the lights closer to the soil and then slowly raise the lights as the plants grow.
The problem you must watch out for is heat. Many vegetables like warmth, but outdoors, they get a breeze and cool soil to moderate the sun’s heat. Indoors, they just get dried out and too hot. For a long time, we have used fluorescent lights, but now many gardeners are switching to LED fixtures.
One of the reasons many people try planting vegetable seeds is to get more plants for a lower cost than buying plants in pots from the garden center.
Spending money on lighting fixtures messes with the budget, but if you get fixtures that can be used around the house during the rest of the year, you save a little bit. LED lights also don’t cost very much to run, so that will help keep the cost down. Use LED bulbs that say on the package that they emit light similar in color to sunlight.
Most likely there was an outbreak of a fungus. There are several groups of fungi that can infect and kill seedlings. The problem is called “damping off,” which kind of gives us a hint at one of the conditions that contributes to the problem.
To have a disease outbreak, we need several things to happen all at once in what I call the Disease Pentagon. We need a disease pathogen, a susceptible host, a proper environment, a long enough time, and possibly a vector organism.
The disease pathogen in this case is probably one of the fungi in the Fusarium or Pythium genera. The susceptible host is the vegetable seedling. The proper environment is overwatered damp soil that doesn’t dry out. The time factor is the fact that the soil stayed wet long enough for the fungi to infect the plant. The vector organism in this case could be dirty hands, tools, trays, old potting soil, or fungus gnats that moved the fungi to the trays.
This year, you should either wash and clean your tools and trays with soap or start with new ones. Buy new potting soil for seedlings that is sterilized.
When you water the soil, don’t overwater, and let the soil dry off a bit on top before watering again. If you see a seedling fall over at the soil line, immediately use a spoon and remove the plant and the soil in that spot in the tray to try to save the other seedlings. Use a mist bottle to spray the soil in the surrounding trays with rubbing alcohol.