Code is much simpler to reason about with parameter passing. You can literally see where the data comes from. Once you have global state (or semi-global state with coroutine contexts or `ThreadLocal`s), data can come from anywhere as a side effect. While global state is sometimes convenient and can be pretty manageable on a smaller scale, many systems we build grow over time. At that point, comprehensibility suffers when we have webs of implicit interdependencies. See this thread on why Jim Sproch once said he regrets having introduced `CompositionLocal`s to Compose:
https://twitter.com/JimSproch/status/1573034165406089216
That being said, every architectural decision depends on context, so this may not apply to your use-case. Does that make sense?