The deeper art of crafting clickbait (as you ask), can be learned by studying the logical fallacies and other logical errors, such as affirming the consequent, argumentum ad numerum and loaded questions/statements.
This is a quick answer and might contain "glitches" under strict logical error analysis, so please excuse. Just trying to cover some basics(not all) with these examples about a messenger app.
For example:
Why is everybody using THIS messaging app?
Why is everybody using the new messaging app from the Richie Rich software company?
Why all your friends are having fun with this great new app?
Why are the rich and famous using this cool app?
Why normal people are envying users of this great messenger app?
What is making investors give all their money to the makers of this new messenger app?
These examples combine the logical errors argumentum ad numerum, loaded questions, affirming the consequent and also the argument to wealth, appeal to authority and the burden of proof. I add burden of proof because as an argument, the clickbait is making you feel some need to click the link to get the proof. Is that right? Not sure, maybe not. But the others are all definitely mixed into the clickbait but are not just used in headlines or links, but everyday by people everywhere.
To keep it short, logical errors are mixed up, and normally presented in loaded question form, but can also be made as a loaded statement.
Example:
The messenger app that saved a busload of kids
Or... The trendy and free messenger app that heroically saved a packed bus of under-privileged inner city kids
From what? Being late for a sports match if you click the link and read more out of interest?
The messenger app that the executives are using(Appeal to authority. Executives use it so it is better.
Which executives? Three guys from a company in Europe who happen to be executives).
These tourists would have been stranded had it not been for this new messenger app?(Stranded how?
Click the link and it might go on to describe how they used the messenger app to get a ride into town to go drinking. Versus paying for a ride share etc...)
Ok, some slightly naive examples but I hope I have contributed indirectly to your question so you can understand how the logical errors form part of many tricks. And by understanding these errors how you can make better clickbait but also not be a victim of it, which is what you should really be doing, in my opinion anyway.
Please no Philosophy graduates making to many corrections. I am just linking the concept of logical errors to the concept of clickbait as a starting point for the deeper art of clickbait, and also understanding arguments in other contexts as well, not just in headlines.