The true name is a stepping stone to gaining full control of the demon.
The only way to truly control a demon is either to possess its demonic amulet (if it has one) or to bind its essence to an object.
Unlike other fiends (Devils and Yugoloths specifically) having the true name of a demon doesn't allow you to control it directly. Instead it allows you to more safely (and consistently) step up to full control of the demon.
As you have noted, it's not a whole lot of use if the demon is already on the Material Plane (unless your party wants to leave the Material Plane). There is an answer to this conundrum...kill the demon to send it back to the Abyss. Then your party can use its true name as a stepping stone to full control.
But what are the stepping stones?
- Summon Greater Demon
- The true name
- Gate
How can my caster put these together?
Having the true name of a demon mechanically gives them disadvantage on the saving throw from Summon Greater Demon. However Summon Greater Demon has a downside for the Mage bent on having a pet demon...it only summons a demon for a short time (up to an hour). Having the demons true name enables your caster to start a process of gaining full control over the demon.
While temporarily in control of the demon, from Summon Greater Demon, you can force the demon to either create a Demonic Amulet or to assist in binding the demon to an object (with the Demonic Amulet being preferable as it doesn't have the potential downsides of a bound object).
The other primary use for the true name of the demon is to enable you to summon it specifically (and permanently) to the current plane using the Gate spell. This is obviously more useful if you have established control of the demon already.
TL;DR?
The basic process of utilising the true name would be:
- Kill the demon to send it back to the Abyss
- Use Summon Greater Demon (multiple times if necessary), in concert with the demons true name, to summon it back to the material plane and force the demon to create a Demonic Amulet (or to bind it to an object)
- Note: you should use the option in the spell that confines the demon within the blood circle
- Once the item allowing control of the demon is procured use Gate to summon the demon to you (permanently) and control it using the item from #1
- Profit...so long as the demon doesn't possess you (assuming you are using a bound object)
An alternate route would be to:
- Kill the demon
- Create an inverted Magic Circle to contain the demon
- Summon the specific demon into the inverted magic circle using Gate (or Summon Greater Demon) and it's true name
- Cast Planar Binding (either directly or using Wish) to gain control over the demon
- Use that control to establish permanent control over the demon using a Demonic Amulet or binding the demon to an object
What if we don't want to/can't kill the Demon
In this case the true name isn't much use while you stay on the Material Plane.
Option 1: Have the party leave the Material Plane and perform either of the two routines laid out above on that other plane
Option 2: Your caster can use a combination of Magic Circle and Planar Binding to bind the demon to service (for up to a year and a day if a 9th level slot is used).
The route to do this is:
- Create an inverted Magic Circle to contain the demon
- Cast Planar Binding (either directly or using Wish) to gain control over the demon
- Use that control to establish permanent control over the demon using a Demonic Amulet or binding the demon to an object
Potential fun (expensive) hobby for your players...ruining the demons plans over and over again
The true name of a demon can cause serious disruption to its plans if your party is able to use Plane Shift (multiple times) in conjunction with Gate to move that specific demon at will to different planes of existence.
Note: the knowledge required to create either a Demonic Amulet or to bind a demon to an object may require a quest all of its own
Relevant source quotes
Demonic Amulet (Mordenkainens Tome of Foes):
A demon that stores part of its essence in a demonic amulet can avoid being destroyed even if it is killed in the Abyss. On the other hand, anyone else who lays claim to such an item can command the demon to do as they wish.
Bound demons (Monster Manual):
A creature that handles such an object experiences unsettling dreams and wicked impulses, but is able to control the demon whose essence is trapped within the object. Destroying the object frees the demon, which immediately seeks revenge against its binder.
Demons > Eternal Evil (Monster Manual):
When a lucky hero manages to drop a demon in combat, the fiend dissolves into foul ichor. It then instantly reforms in the Abyss, its mind and essence intact even as its hatred is inflamed.
Demon True Names (Monster Manual):
A mortal who learns a demon’s true name can use powerful summoning magic to call the demon from the Abyss and exercise some measure of control over it. However, most demons brought to the Material Plane in this manner do everything in their power to wreak havoc or sow discord and strife.
Devil True Names (Monster Manual):
A mortal who learns a devil’s true name can use powerful summoning magic to call the devil from the Nine Hells and bind it into service. Binding can also be accomplished with the help of a devil talisman. Each of these ancient relics is inscribed with the true name of a devil it controls, and was bathed in the blood of a worthy sacrifice — typically someone the creator loved — when crafted.
Yugoloth True Names (Monster Manual):
In the course of making this new army, the hags crafted four magic tomes and recorded the true names of every yugoloth they created, save one, the General of Gehenna. These tomes were called the Books of Keeping. Since knowing a fiend’s true name grants power over it, the hags used the books to ensure the yugoloths’ loyalty. They also used the books to capture the true names of other fiends that crossed them. It is rumored that the Books of Keeping contain the true names of a few demon lords and archdevils as well.
Petty jealousies and endless bickering caused the sisterhood to dissolve, and in the ensuing power grab, the Books of Keeping were lost or stolen. No longer indentured to anyone, the yugoloths gained independence, and they now offer their services to the highest bidder.