There's an optimal frequency that builds your squats and deadlifts best, but you need to learn this through trial and error. Here's how.
Spend two months doing each of the following: squat once per week, squat twice per week, squat three times per week, and squat four times per week. Stick to 3-5 work sets per training session. Pay close attention to your strength levels and how your body responds so you can determine your ideal training frequency.
If your anatomy is well-suited to handle squats, then I suspect that 3-4 sessions per week is ideal for you. But if your hips, knees, or low back feel beaten up from squatting, 1-2 sessions per week will be more beneficial in the long run.
There's also an optimal deadlift strategy that builds your deadlift best, but figuring this out requires experimentation.
Take a few weeks and do this: Deadlift heavy once every other week, deadlift heavy once per week, deadlift heavy twice per week, deadlift heavy once per week and lighter for speed another day per week, deadlift three times per week with moderate volume and effort, and also try avoiding the deadlift altogether.
Some lifters do best through specificity, while others see better results with variety and focusing on assistance lifts. Experiment to find what works best for you, but also know that what works best for you right now might not be what works best two years from now. This is what makes weight training so much fun (or so frustrating, depending on how you look at it).