Going by the guidelines in the DMG, a 20th-level character does not gain any further levels. However, the DM may at their discretion hand out Epic Boons at appropriate moments to fit the story, with advice suggesting that offering one every 30,000xp or so above the 355,000 needed to get to level 20.
Options for boons include:
There's advice on how these manifest and what sort of effects they have on their recipients, too.
Options for boons include:
- An ability score increase
- A feat
- An Epic Boon, including:
- Turning a (melee weapon) miss into a hit once per short rest
- +20 to one ranged attack once per short rest
- An extra 9th level spell slot (only obtainable if you have 9th level slots)
- An extra 40hp
There's advice on how these manifest and what sort of effects they have on their recipients, too.