The first music box is believed to have been invented in Switzerland in the 1770s by placing small musical movements into watch cases. These were cylinder style music boxes that used a small tuned-steel comb that played pins set in a cylinder. By the 1800s the music boxes had shrunk noticeably in size and many new developments started to take place that improved the look of the case and added more teeth to produce greater sound. – Frankenmuth Clock Company

Long form articles:
https://www.hautehorlogerie.org/en/encyclopaedia/history-of-watchmaking/
https://www.jaquet-droz.com/en/the-extraordinary-history-jaquet-droz

The Mastery of Time A History of Timekeeping, from the Sundial to the Wristwatch: Discoveries, Inventions, and Advances in Master Watchmaking
Dominique Franco Cologni Flechon
Published by Flammarion (2012)

Golden Age of Automatic Musical Instruments: Remarkable Music Machines and Their Stories
Reblitz, Arthura
Published by Mechanical Music Pr (2001)

Playing Their Parts: 19th Century Automata, Musical Boxes and Singing Birds
Theriault, Florence
Published by Gold Horse Publishing, Annapolis, MD(2005)