That in itself is kind of a pointless question. They’re both better. They’re both necessary if you want to build a solid physique. They both address different aspects of the lower body. It really comes down to your overall specific goals.
What is Your Goal?
Better for what? What are you hoping to achieve by the end of your lifting program? If you are a powerlifter you’re going to have to be better at both. If you are injured you might not be doing either. Whether your goal is overall strength, or hypertrophy, chances are you are at some point going to need to incorporate a steady supply of both.
Hips vs. Knees
One movement is a hip hinge, and the other is a knee dominant movement. When you are performing a deadlift, you need to know how to properly cue your hips to sit back while keeping the bar as close to your shins and body as you drive the bar up. When you squat, you need to be able to sit down as far as you can go and close the angle at the ankles and knees and hips to achieve a proper depth.
There is some overlap in muscles being hit in both. The squat hits the quads, glutes with your adductors, abs, low back, and upper back helping support stability throughout the movement. The deadlift will also target your glutes and back, but also hit the hamstrings and lats way more so than the squat.
The main reason you are including one or both into your routine is because they are compound movements that stimulate multiple muscles through a full range of motion. They also allow incredibly heavy loads that most other lifts can’t come close to allowing for a stimulation for strength gains you can’t get otherwise.
So again, it comes down to your overall goal. If you want to build a thick back, and get better at pulling, then deadlifts are the way to go. If you want bigger quads and overall legs, then squats will be more effective at doing that.
Consider your leverages too. Taller guys may find squatting a lot harder than deadlift. Guys with shorter arms will find deadlifting harder. That’s not to say ignore those lifts because of the inconvenience, but just something to keep in mind.
Ultimately what we’re trying to figure out here is choosing exercises to incorporate towards your goals. A workout plan will only be followed if the individual likes the workout. Maybe you don’t like the traditional squat or deadlift. Maybe your frame or previous injuries prevents you from getting the most out of those lifts. There are other options you can seek out.
Squat Alternatives - Front Squat, Zercher Squat, Goblet Squat, Leg Press
Deadlift Alternatives - Sumo Deadlift, Trap Bar Deadlift, Deficit Deadlifts, KB deadlifts