There is a system in place that’ll free up names from inactive accounts, as long as they have been inactive for at least the past 2 expansions.
That would have last run at the release of Battle for Azeroth and freed up names on accounts inactive during Warlords of Draenor and Legion.
If the name wasn’t freed up then and is showing as unavailable, the earliest that would be freed up is with the release of Shadowlands, but only if the account currently using the name had been inactive for all of Legion and Battle for Azeroth.