Usually, when you want a servo motor, you simply buy one already made ... There is also a 3D printed gearbox and housing. Overall, a very well-done project. The motor control uses a PID algorithm.
Hobby servos are nifty and useful for a wide range of projects. There’s nothing stopping you from building your own servos though, and you can even give them nifty features like 360-degree ...