The relevant Merriam-Webster definition adds a well-considered caveat:
formula ... 4:
a customary or set form or method allowing little room for
- All her books were written according to a familiar formula.
So a formula is an established method.
Other well-known senses of formula must also inform this usage at the subtext level: the chemical usage, the mathematical usage, the high-tech ('Formula 1' etc) usages. These put the word into the formal / qualified / adept / more sophisticated register. A complex series of steps is quite strongly implied.
While method can probably almost always be used in place of this sense of formula (with broadening, and loss of the connotations mentioned), formula is often the better choice. But by the same token, of course, often inappropriate.