Rest days are needed to allow the muscles to recover, exercise effectively damages the muscle and it rebuilds itself to be bigger and stronger. Without rest you run the risk of over training the muscle and will reduce the benefit of the exercise.
Give yourself a rest day every couple of days and just stretch your legs out rather than doing the squats. If you’re feeling pain reduce the amount you’re doing (50 from nothing is quite a lot), pain is the body telling you something isn’t quite right, you will feel discomfort when exercising as it is hard work, but pain is bad. The phrase should really be “No mild discomfort, no gain”
Diet won’t help a great deal with the soreness, but ensuring you’re getting enough proteins, amino acids etc. will give you body the fuel it needs to rebuild and recover efficiently