You can play standard games like D&D solo, or use games designed to be played solo like Ironsworn [0]. Journaling games are another option that can be played alone or with friends, Thousand Year Vampire [1] for example. Lots of recent games have rules for a "solo mode" now.
The Mythic GM Emulator [2] is a simple way to play any game solo.
If this sounds interesting check out Me, Myself, and Die [3] to watch a high production value version of solo play!
[0] https://www.ironswornrpg.com/
[1] https://thousandyearoldvampire.com/products/thousand-year-ol...
[2] https://www.drivethrurpg.com/product/20798/Mythic-Game-Maste...