What is the highest ability score possible for a player character (including magic items and temporary effects)?
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.
Normally you cannot raise your ability scores above 20. Only way to increase it naturally is through capstone barbarian ability which raises cap for Constitution and Strength to 24 (and add +4 to those abilities)
Some magic items can raise maximum as well:
- Manuals and Tomes add +2 to to both current and maxmum score (unlikely to be able to use more than once)
- Major Beneficial Property of random artifacts can increase ability score up to 24.
- Books of Exalted Deeds/Vile Darkness can increase one ability score by 2 up to 24
- Blessings (supernatural gift) can increase ability score up to 22
DMG suggest another opportunity to raise your ability score: ss an alternative to Epic Boon, you can increase one ability score by 1, up to maximum of 30
So it seems that answer is 30 — avaliable only as 5e incarnation of epic levels