In general, yes, you can absolutely weigh your flour (and other baking ingredients), and indeed should whenever possible.
There's an important caveat, however.
Weighing your ingredients produces more consistent results when reproducing a recipe. This is because measuring cups are not precision tools; there is variation in size from model to model. Bakers' techniques for filling them also vary. Indeed, the amount of flour can vary from scoop to scoop even for the same person.
When you weigh the ingredient, you eliminate two key variables: (primarily) the amount of air that ends up in the scoop, and the variations in size of measuring cups (grams don't change unless you change planets or your scale is broken). You also avoid simple differences in judgement of how full the scoop is.
Now, the caveat that emerges from this: when you make a recipe whose ingredients are measured by volume, you have to contend with this imprecision. The recipe writer's "1 cup" might be a cup minus a tablespoon by your measure. You've probably had the experience of a recipe coming out poorly the first time, and tweaking the ingredients next time. This is you compensating for the difference between the recipe author's equipment and technique and your own.
This problem does not go away if you switch directly to using weight. (In fact it might be exacerbated.) Since the recipe author did not give you weight, what was written down as "1 cup" might not be that standard 120g. It might be 128g, or 108g. While you are on the road to better reproducibility of the recipe, you likely still face a few rounds of trial and error.