It all depends on what problems you are experiencing.
Gums and varnishes form from the liquid stuff within the fuel itself. Such stuff can form within tanks, lines and within injectors. It’s these gums and varnishes that cause injector issues, often because of partial injector blockages resulting in poor spray patterns. It’s such problems that injector cleaner can resolves by dissolving the gums and varnishes... And such liquid stuff that causes gums and varnishes or the dissolved gums and varnishes can’t be caught by a fuel filter.
Filters remove solid particle matter from fuel as it makes its way to the engine. When the filter has removed a specific amount of the solid stuff, the fluid flow through the filter is impacted. Such blocked or partially blocked filters also cause problems with injection. That’s why they are listed in the service schedule and require periodic replacement (except for the our VF which must use unicorn dust in their filter construction)…
So how you approach this chicken or egg question depends on what problems you are having.
If fuel pressure and flow rate are poor, then replace your fuel filter and check pump performance. If such things are in spec and the engine still stumbles, try injector cleaner. Just note that some injector cleaner manufacturers state that after using two or so bottled, the engine oil (and presumably the oil filter) should be replaced.
Also note that if an injector is blocked, injector cleaner won’t help if the fuel and cleaner can’t flow through the injector to clean it. In such cases, removal and cleaning off vehicle may be needed. I’ve successfully used the following method at home (after cleaning and soaking injector in isopropyl alcohol)…