Decision trees
Where should this work run, what should it run on, and where does the data belong. Answer the question in front of you and the tree narrows; every leaf states what the recommendation buys and what it costs, because a recommendation without a cost is marketing.
A product requirement arrives. Before choosing a library, decide where the work runs and what kind of store it belongs in. Almost every backend design mistake is made at this fork, not later.