I highly recommend The Song Machine (Inside the Hit Factory) by John Seabrook. The author describes the modern reincarnation of the Brill Building that pumps out pop hits using methods that we would not call songwriting (Max Martin, Dr. Luke, etc.). The goal is to get you to listen to 30 seconds of a song (that counts as a spin on digital streaming services). They've decomposed the process into mass production of backing tracks (using pro tools) which then get handed to so-called topliners that add the "hook" (the catchy part of the song). They stick the famous artist at the beginning of the song to get you past the 30 second threshold.
In a similar way, back in '88 KLF wrote tongue-in-cheek "manual" for writing a top pop song, a hilarious and cynical view into how a musical sausage is made:
This book is a fun read and goes a long way toward explaining why so much of today’s music is crap. It’s the difference between mass production and craftsmanship - and mass produced music just isn’t very good. Not to me anyway.