The verdict
A main lift and its finisher, not two rivals. Both are listed as pushes at beginner level and both list the quadriceps as a primary muscle. The squat adds the glutes as a second primary muscle, with the adductors, hamstrings and lower back helping, and works through knee extension and hip extension. The leg extension lists the quadriceps as its only primary muscle and no secondary muscles at all, and works through knee extension only. The squat is the lift your program tracks; the extension is the lift that adds quad volume after the squat without loading your back or hips. Most leg days want the squat first and the extension after it.
Muscles, equipment, force and level from the PasteLift exercise library records for the leg extension and the barbell squat. Sets and reps from the ACSM position stand, cited below.