There are a number of ways to stain the water in a tanks and all do not involve tannins. Some can lower pH whiles others will not. However, tannins do not persist in water. Depending on the source, how long will vary. Here are the ones I use and what they offer and how long it will last.
Driftwood such a that from Malaysia will stain the water but over time this ability will get used up. Depending on how much wood, you may see the pH drop some.
Indian almond leaves will add tannins, mildly lower pH and add a bunch of healthful things to the water. You can get a similar result (but not as intense) from certain types of oak leaves. These will not persist and need regular additions of new leaves. Leaves are sldo great hiding places for some fish and they may even breed there. They also produce food for some fish as the leaves degrade.
Alder cones are great for staining and lowering pH. I am not sure of the health benefits.
Rooibos tea is great for staining, It does not lower pH (they may even raise it by .1 or so). They also add a lot of things beneficial for fish. It can go into a fin mesh bag in ones filter or it can be brewed like tea and poured into the tank (I do it this way).
Imo, unless the native waters for a fish are stained, they do not really belong in a stained water tank. However, there are other botanicals that one can have that do not stain and may impart benefits. Here is a site that sells these and should give useful info. I am not endorsing them only offering their info. I have never bought from them.
https://tanninaquatics.com/