If you want to continue with one of your old characters, you (might) have a couple of options.
Check to see if you have access to Chromie Time. She’s near the embassies in Org/Stormwind. For Orgmimmar that’s in the Goblin area and for Stormwind it’s strait out the back gate in the Dwarven District that leads to the Cataclysm portals. If you’ve got access to her, it will be marked with an hour glass on the map.
Turning on Chromie Time for any expansion will cause all of the expansions to scale up to level 50 so you can level up in any of them. (Or mix and match) Which one you choose will determine which dungeons you see in the dungeon finder (the old Vanilla ones are in the Cata timeline) and you’ll get a breadcrumb quest.
Officially, the requirement for access to Chromie Time is a level 50 on your account, but it looks like many people with max level toons in older expansions were grandfathered in and have access.
You get kicked out of Chromie Time when you hit 50, and then it’s on to Shadowlands. (You can finish up what you were working on, but scaling will be disabled.)
Without Chromie Time, expansions will scale with you up to their natural cap:
Vanilla (original 1-60 zones), BC, Wrath: 30
Cata (the old 80-85 zones) and MoP: 35
WoD: 40
Legion: 45
BfA: 50
With the exception of the old 80-85 Cata Zones, all of the other expansions can be started at level 10, although some of the later zones in each expansion will have slightly higher level requirements. Cata zones require 30 as you need flying for them.
As you can see, without Chromie Time, only BfA scales all the way to 50. To start BfA, talk to the Herald NPC next to the Hero’s Call/Warchief’s Command board and pick up the quest they offer. That will lead into BfA content.
As Legion scales to 45, you can get to 48 (which is when you can get the Shadowlands quest) without Chromie Time before the XP penalty really starts to hurt. To start Legion, go to the Hero’s Call/Warchief’s Command board and pick the “Broken Shore” option.
Warlords of Draenor is a popular Chromie Time leveling choice as it’s pretty efficient. (Especially after 30 with flying.) I’m not sure how much of it you did before you left. Having characters at 40 indicates you probably leveled up to max at least in WoD, so it might not be new content for you. For a character that hasn’t done anything in WoD, it can be started by picking the “Tanaan Jungle” option from the Hero’s Call board.
(The Hero’s Call/Warchief’s Command boards only show 3 options at a time, so sometimes you have to dig for the quest you want. Just start accepting quests until the one you want pops up and abandon the ones you don’t. (Legion and Warlords tend to be at the top of the pile.)