Low testosterone is a known cause for anxiety. For many men, TRT improves their anxiety significantly, or resolves it completely. In fact, the science backs this up:
https://pubmed.ncbi.nlm.nih.gov/22972022/
https://www.drg-diagnostics.de/files/jin_ispne-zuerich_2017.pdf
There are certainly reports of men on TRT getting anxiety. This has been proven to be due to estrogen. In fact, there is no study that has been done that shows testosterone itself causes anxiety, except in women (higher T in women has been proven to increase anxiety). Read for yourself:
"In boys, elevated estradiol was associated with elevated depression (OR=4.75 [1.95, 11.56]) and anxiety scores (OR=2.43 [1.01, 5.84]). In linear regression, estradiol was positively associated with depression (difference/10% hormone increase (β=0.45 [0.15, 0.75]) and anxiety scores (β=0.42 [0.13, 0.72]). Higher cortisol levels strengthened the depression association with estradiol in boys (β=0.54 [0.12, 0.96]), and with testosterone (β= -0.19 [-0.35, -0.03]) and DHEA (β= -0.12 [-0.22, -0.02]) in girls
Source: https://pubmed.ncbi.nlm.nih.gov/34375211/
https://www.sciencedirect.com/science/article/abs/pii/S0306453017304195
https://pubmed.ncbi.nlm.nih.gov/29107881/
As you can see, testosterone is a mood stabilizer for men, and can be curative of both anxiety and depression. Estrogen levels, either too high or too low, are the source for anxiety.
This means, in men who develop anxiety with TRT, there is a very good chance that they are aromatizing too much, and have an elevated estradiol level as the cause.