Unlikely to be the highest possible, but the highest typical 20th-level ability score, assuming you’re focusing on it, is 36:
- 18 base
- +2 racial
- +5 from levels
- +6 from enhancement bonuses
- +5 from wish or a manual
For mental scores, there is also the +3 bonus you can receive for being venerable. These usually come with a −6 penalty to all physical scores, so this is not generally considered optimal unless you have some way of ignoring the penalties (losing 60 HP and taking a −3 to initiative isn’t worth +1 to your DC, even if you have no other uses for physical scores). But you could get to 39 by being venerable.
Anything beyond this requires special bonuses that are not typically available: unusual items that grant non-enhancement bonuses to an ability score, feats or class features that improve an ability score, and so on. Strength and Constitution get a lot of these, and Dexterity some, but mental ability scores only receive such bonuses rarely. I am not aware of any for Charisma, though I don’t doubt there are some.
22 AC
With the changes to the Warforged Integrated Protection racial trait (specifically the change to give you +1 AC, and a method to wear armor...meaning you also have a method to not wear armor), it is now possible to get an AC of 22 at character creation.
Option 1: The Plate Mail route
If you can manage to get a set of Plate Mail at level 1 (either by gift of a generous DM, or using the Inheritor method, of selling your incredibly valuable piece of jewelry [eg jeweled platinum ring] to buy a set of Plate Mail), then as a Warforged Fighter, with the Defense Fighting Style, or as a Warforged Forge Cleric you can get an AC of 22:
Calculation:
- Plate Armor
- Shield
- Warforged Integrated Protection Racial Trait
-
You gain a +1 bonus to Armor Class
- Blessing of the Forge or Defense Fighting Style
For a total of 22.
Option 2: The Barbarian Route
Be a Warforged and either using the standard racial increases of +2 Constitution, +1 anything, or by using Tasha's alternative method for assigning racial ability score increases and choose +2 Dexterity and +1 Constitution instead, you can achieve an AC of 22.
Calculation:
- Unarmoured Defense
- 10 (Base) + 5 (Con/Dex) + 4 (Dex/Con) = 19
- Shield
- Warforged Integrated Protection Racial Trait
-
You gain a +1 bonus to Armor Class
For a total of 22.
Importantly for this build, the Integrated Protection bonus AC is explicitly not armor, just a result of your body's
built-in defensive layers, which can be enhanced with armor
Best Answer
The highest score you can get is 30, which is a hard limit. See also this question.
You could get one by using True Polymorph or a comparable effect to turn into a creature with such an ability score, if you know of one.