One of the "rules" that is often taught to trainers and preached in gyms is the rule that you should never lockout your joints. While locking joints out is sometimes a bad idea (e.g. if you had hypermobility in your elbows and where doing an upper body pressing exercise), when it comes to the hip hinge, it is a whole different story.
I already talked about how to do the hinge. A key part of the hinge is the lockout. There are 2 main muscle groups that extend the hip joint: the hamstrings and the glutes. While they both can work in extending the hip at the bottom position of the hinge, the hamstrings lose mechanical efficiency at the top and thus the glutes are main muscle responsible for completing hip extension.
When I see someone doing a deadlift or some other hip extension variation, I commonly see them either fail to reach lockout (complete extension) or they fake lockout with lumbar (low back) hyperextension. Failing to lockout means that you glutes are not getting as much work as they need. This means you are missing out on the benefits I discussed at the beginning. In today's seated world, weak lazy glutes are the norm and an any exercise technique that effectively targets them is a great thing. Faking lockout with lumbar hypextension is even worse as you not only lose out on the benefits, but you also place extra unnecessary stress on your spine.
Here is a short video showing you how to properly lock out your hips that is helpful for any type of hinge exercise (e.g. deadlift variations, hip extension exercises, swings, etc).
Always remember: picking the right exercises is only part of the results equation. The other part is how you do the exercise.