I agree that some carbon offsets / credits are "high quality", i.e. represent actual, durable reductions in someone's emissions. They can help with the important projects you mention.
When the result is to durably sequester carbon from the atmosphere, I also agree that this is a good contribution toward net zero. I don't know anything about mangrove planting, but that sounds like it might fit. Certainly the Climeworks project someone mentioned elsewhere in this discussion fits.
The problem is with "avoided emissions" offsets. Suppose X and Y are both emitting greenhouse gases, and X pays Y to stop. That's a half solution, but it is often treated as a complete solution: X looks good because they bought an offset, and Y looks good because they're no longer emitting anything. That's the shell game.
Concretely, let's consider rainforest preservation. This is critically important, and plausibly (I don't actually know a lot about it) requires payments to relevant actors in places like Brazil. So yes, as a society, we need to come up with money for those payments. But we need to come up with that money in a way that doesn't let some other polluter permanently off the hook for their emissions. If an airline pays to protect some rainforest, says "hey look an offset", and declares victory, how will we ever address the airline's emissions? We've done some good in the short run (we accelerated the effort to preserve the rainforest), but then we arrive at a dead end.
Cap-and-trade systems avoid this problem, if all of the buyers and sellers of credits are part of the system, and the cap is gradually reduced to zero. But if a company says "my plan to reach net zero relies heavily on purchasing offsets", outside of a cap-and-trade system that eventually squeezes avoided-emissions offsets to zero, then we're back to the shell game.