As Eyes says, there are two types of 'solo' games. Those with one player and a GM (also called 'Duo games'), and those where that player is the only person and they do both the GM and player jobs with the help of some tools and random tables (see Ironsworn for a (free) game designed for this, and Mythic Game Master Emulator for a system for playing any game without a GM). I will address the former since that is what you mention in your question.
Not all game systems and rulesets come with the assumption of 'party sizes', 'balanced encounters' or even fighting (Romance Trilogy by Emily Care Boss, for instance), so there isn't always a need to build a party of NPCs.
Your profile indicates mainly DnD 5e familiarity, so we can start with that.
Miss_Sadie says:
... difficult to get running and manage.
Not necessarily. While running for the 'correct' or expected number is definitely simplest, I have found that running 5e for a single character is, in many ways, easier than running for two. Two have all the downsides of three --less personal games, need to wait for others, need to coordinate with others, etc-- without the upsides --large enough party to survive 'normal' encounters, other players to bounce ideas off of and to break deadlocks, etc.
The nature of DnD is that once one character goes down the party is already often in serious trouble and should have run away a while ago. The single remaining character is now a party-half-as-strong and can not do all the needed tasks: killing the monsters (DnD's assumption) or intimidating them into fleeing (the monsters can see that they are winning), defending their partner and themselves while also carrying the body out and fighting, or even stopping to heal without being killed in the process. A third PC could distract while they do this, but with two, once one goes down the other inevitably follows shorty after.
A single player tends to survive more than two. Mainly because they tend to be more cautious with what they face, but also because being defeated or even killed in a battle need not be the end. If one of a two party group survive, the GM now needs to work out how to resurrect the downed one (if it is not easy and boring) and the dead character's player probably needs to make a new character to play in the meantime.
If there is only one PC then it is much simpler for their story to continue after death. Either the whole campaign moves to the 'underworld' or Death offers them a bargain, or something like that. Both of those are hard when not everyone is 'dead', and these bargains only apply to characters they are made with and can derail the rest of the campaign... but, here, the whole campaign was about the single PC anyway, so that is only bad in a muti-PC game.
Personally I have found NPC companions complicated to run. Players either don't get attached to them, which is bad, or do get attached to them, which has its own complications, they need to be strong enough to survive and help and not to simply die if the player is attached, but not so strong that they overshadow the player (they are not a GMPC).
I have had much better results from mounts and pets. Mounts add a lot a versatility to the character, empowering their choices, but don't have an opinion and the players can't ask the companion what
they think the next step should be. Players can struggle to separate an NPC companion's knowledge from the GM's, and tend to treat the NPC's opinions and ideas as being the GM's suggestions. If the GM wants to inject suggestions via NPC they can being the needed NPCs --with the needed expertise-- into a scene to do so, having said NPC with the part all the time gives the player the choice of when to solicit their advice. Mounts and pets don't have studied opinions or their own goals and lives to get to.
As the PC levels one can introduce more exotic mounts, possibly in baby form so they grow in power with the PC. Unicorns, Pegasus, Griffins, and Wyverns and such are all good candidates, as, later, are Dragons, and I have used more exotic options like Gorgons as well. I have sometime given Tomes that teach the Mounted Combat Feat after they have spend significant time in the saddle and would have leaned some tricks.
To deal with the Action Economy, I have also found great success giving the single PC Legendary Actions (possible limited by Proficiency Bonus?). The beauty of Legendary Actions is that they happen
between other's actions, so the number that can be used is limited by the number of opponents. If facing one enemy, there is no 'between' the enemy's Actions, so it is balanced, if facing two, the PC gets an extra action to balance out the Action Economy, if facing 20 they still might only get 6 (Proficiency Bonus) extra actions are are probably doomed.
This adds to the PC's 'Legendary' status, while not borrowing rules from outside the game's books.
Other than needing to help them stay alive --and 5e does not balance encounters for one or two PCs-- it plays much the same as any other game, except with an intense focus on that one player and their character. This allows for story types that don't really fit into group play, 'Chosen ones' and other such unbalanced parties come to mind.