How to decide between 'Hook_preprocessor' or using twig template?
It's not really an either/or thing. They are used together - preprocess functions are run before a template is used. Templates should only have very simple logic, if/else, and loops for the most part. Any logic more complex than this should go into a preprocess function. If you want to do things like adding classes to the attributes of a variable, this should generally be done in the preprocess function, though if you have a class that will only go in a single template, then it can be done in the template itself.