Preparation is key.
The player's job is to assume mastery over their abilities and understand how to mitigate the dangers of an encounter. Single combatants have the sole responsibility of this since they have no other party members to rectify mistakes, and a random critical hit could mark their end.
Different classes each have their own unique ways to prepare for a known encounter.
For a level one or two cleric, this would include preparatory spell-casting such as Shield of Faith to raise their AC by 2, lowering the chance to be hit. If there are multiple enemies, Command could be used to temporarily neutralize one by making them flee or fall prone (or move in a way that is not beneficial, like having a ranged spell caster approach you).
For a level one rogue, this would be identifying environmental sources to generate advantages on the attack to utilize sneak attack. Once the rogue is level two, environmental sources of advantage are not required since they can use Cunning Action to hide. Another mitigation technique would be for the rogue to identify if there's a way to avoid the encounter entirely, since they have no class-specific way of recovering HP.
As the GM, you balance encounters by highlighting important factors to players such as the enemies capable of long-distance attacks (perception to notice the bow on their back), sources that could generate advantages or disadvantages for the enemy (bonfire is their only source of light, the flue of the chimney can be shut to fill the room with smoke), or even enemies that are out of their league and they should avoid (insight or nature to know a single knoll is would be a pretty tough fight and they shouldn't engage the pack of three). Rolls should be encouraged to create logical advantages, disadvantages, or distractions.
Combat is deadly.
Encounters with only a single PC combatant is very dangerous for the PC. If the PC falls to zero HP and goes unconscious, they are at the whim of the GM for what happens next. Unless you want to have this contingency built into your plot line, then you must emphasize the dangers of combat to the player.
A Cleric at level 1 has 13 HP max. A bandit deals 1d6 + 1 damage on hit. This means no matter what preparation the Cleric had, there's a small chance they die in a single strike, though at 1/720 odds it is unlikely. The bandit's average of 4.5 HP means it'll take 3 hits to kill the Cleric.
I can't do all the number crunching for the whole breakdown of how many turns the combat with a single bandit would last (others can do that far better than myself), but needless to say the Cleric will likely have to rest before a second encounter.
Not all combat is necessary.
Because combat takes such a tax on a single combatant, it may behoove you to include ways for combat to be avoided entirely that observant or clever characters can discover.
Stealthily setting fire to a bandit's tent could distract him long enough for the Rogue to free the farmer's daughter and abscond with her.
A Cleric admonishing the bandit and appealing on behalf of the bandit's eternal soul could intimidate or persuade the bandit to turn himself over to authorities.
Sometimes, both combatants realizing that death is on the line could, in and of itself, be the reason why neither wants to fight and lend itself to a conversation instead.
Ultimately have fun.
If death/capture in the first few levels would endanger the campaign, build in a way to guarantee the characters make it to level three before death is a real danger.
You could also change the framework so that the first two levels are being told through flashback, so that if a character mechanically fails, you can then narratively recover by explaining something that brings them closer to the present such as a mentor that helps but sticks to the shadows until needed, a group of travelers happening upon the unconscious body, or have being captured be the way the two now meet up (rescuing the other character from a bandit or goblin pack, for instance).