Yes, testosterone is connected to libido but it's not solely responsible for it. For example, dopamine, cortisol and estradiol all impact libido. Also, women can have very high sex drives but produce hardly any testosterone.
What this means is that men who blame their low desire on low testosterone may actually also have a mental block. Because our society has this story that men are supposed to want sex all the time and be able to get an erection at the drop of a hat, if a guy has a lower desire for sex or has some difficulty getting/maintaining an erection, he can feel very embarrassed, emasculated, ashamed and anxious that something is wrong with him.
Because anxiety and shame can actually hinder desire, arousal and pleasure, these mental blockages can become a self-fulfilling prophesy. One way to work through this is by getting him out of his head and into his body.
This could be helping him focus on pleasure, not on performance. A lot of men think they need to instantaneously get a rock hard erection, penetrate their partner for 3 hours straight, and then ejaculate. It is a very linear and very narrow way of thinking about sex. If sex doesn't look like this or if he can't perform sex like this for whatever reason, he may feel like there is no point.
So, broadening your definition of sex and brainstorming or exploring other ways of being sexual together is important. That way, you can still be sexual with each other in a way that maybe doesn't invovled an erection, or penetration, and instead just focusses on what feels pleasurable.
I use the analogy of an Erotic Menu. Imagine that being horny is like being hungry. And when you're hungry, you and your partner choose from a menu to eat from. It's the same when you're horny, you and your partner choose from your Erotic Menu what to "eat" in order to satisfy your needs.
Unfortunately, many couples only have one item on their Erotic Menu: penetration. And that might not be what one partner wants or it may be something they're not capable of at that moment. So it's important to add other things to your Erotic Menu that you can choose from in order to satisfy your "hunger."