The verdict
It depends on where you are in the squat. Both list quadriceps and glutes as primary muscles, with knee extension and hip extension as the joint actions, and both are compound push lifts at beginner level. The goblet squat holds one dumbbell or kettlebell at the chest, and the front load makes it easy to sit upright and reach full depth. The barbell squat loads a bar across the upper back and trains the quads and glutes plus the adductors, hamstrings and lower back. The goblet squat is the regression the back squat's own record points to, and the barbell squat is the progression the goblet squat's record points to. Learn the pattern with the goblet squat, then load the bar.
Muscles, equipment, force and level from the PasteLift exercise library records for the goblet squat and the barbell squat. Sets and reps from the ACSM position stand, cited below.