I started DMing recently again (last time was in the 80's) for a couple of families (parents plus their kids). It's been a blast, but like you, there are times where some of them can't show up making it a slight challenge at first.
I have also had to learn how to adjust what I threw at them to make it challenging and to not just do a Total Party Kill (TPK). I don't mind PCs dying if they make poor decisions or their die rolls simply don't go their way but I am not a DM that seeks to throw a possible TPK scenario at them just for the fun of it.
Anyway, to answer your questions...
1) No Shows: This is handled in two ways in my sessions.
First, I have a copy of their character sheets and get updated ones periodically. That way, if someone misses, we can make the necessary adjustments and either I or one of the other players will run their PC. Also, if someone forgets theirs, I have a copy.
Second, I am lucky that I am running a game for two families. So if someone in one of the families can't make it, one of the other people in that family will bring their sheet and someone will run that PC.
2) Adjusting the encounters: This takes time and experience. So, to help answer the question on this, I will share my experience. First, our group is comprised of 6 Players. Each of their PCs started out at 2nd level which they are still at in a Homebrew campaign. But, the principals you will find in the below apply also to modules that you buy.
The first couple of sessions they ran through the small pack of wolves and later a group of 8 goblins (6 on foot and two riding wolves) I threw at them. But, I quickly learned how they strategized, they ran their PCs and how the various classes, weapons, and spells they liked to use affected the encounters.
We play every other week. That gives me time in between sessions to rescale what I throw at them. Because they were heading to a goblin hideout, I knew I had to increase not only the number of goblins I threw at them but also add some challenges for them (i.e. traps and unexpected events).
Along the path they were tracking the goblins down, I added traps, 2 goblin archers early on along the path, and another 4 closer to the hideout. I increased the number of goblins in the hideout to 43 total and added a surprise if needed...the goblin boss could turn into a werewolf. An ability that was given to him by Malar, the god they served. I also added 11 stirges to the mix that were controlled by the goblin shaman.
For 6 PCs that may seem like a lot, but remember, I learned how they worked together, strategized, fought, and used their spells. So, I knew I had to make it more challenging by making the goblins more strategic in their fighting as well.
I also created an NPC, a half-elf druid, that would come to their rescue if need be. I found a pregenerated druid, changed a few of the spells to what I knew would be helpful if he had to show up, and created a simple backstory of why he showed up in the nick of time if the PCs had a chance to question him (he and goblins have had skirmishes in the recent past and some of the druid's woodland friends keeping an eye on the goblins told him the PCs had tracked the goblins to their hideout. He knew they would need his help so he came). He was of high enough level to be of assistance but not so high to where he would take the challenge away from the PCs encounter. In other words, he wasn't their savior but simply an extra hand in the fight.
Remember, he only showed up if needed. I ended up bringing him to the rescue because they began to roll more ones that I have ever seen in a game, probably at least 10-12 ones were rolled. One person rolled 4 ones in a row and the goblins were beginning to overpower them. Several of the goblins were rolling 20's and none of the PCs were. But, the PCs were still making themselves a bit of a threat. Still, even with the Druids help, it made it for a tough fight and they finally won. Only one PC went down but he didn't die. All of them were low on HP.
The boss, when the druid showed up, turned into a werewolf (but without damage immunities a normal werewolf had. But max HP). Amazingly, the PCs' rolls also began to become much better and the tide changed for a bit. The shaman also had the stirges begin to attack. At that point, I had to judge whether to actually have them do so or not. So, what I did was that since the shaman was controlling them, each time he took a hit, he had to make a Concentration check. He passed each one. But then, he was killed. At that point, the PCs were beginning to become overwhelmed again, so I had the stirges become confused since they were no longer being controlled. I simply had them become a distraction for the PCs as they swooped down at them during the battle but not actually attack them. I just kept the possibility of them attacking in the forefront of the players' minds.
Finally, the PCs and the Druid won the fight. As it wound down, I had the stirges return to their roosts in the upper regions of the caverns. It is still possible they will attack as the PCs explore the hideout. And you never know, a goblin hunting party may return to find their tribe decimated and the PCs in their home. I have to keep the PCs on their toes and guessing, "What now?"
I shared all of that to share these principles,...
1. ADD SOME BEEF: Understanding how my players play their characters, I knew I needed to beef up the number of goblins from 20 - 43. Depending on what happened I could always reduce the numbers or even have them run away due to low morale. I also had them attack in waves and not all at once which also allowed me to control the actual number of goblins that were involved in the fight based on what was happening. If it was too easy for the players, I added another wave of goblins. If it was becoming too hard for the players, I simply never brought the other goblins into play.
NOTE: I did the beef up because it is harder to start out with a small number of them and try to reasonably explain why a bunch more showed up all of a sudden. I can explain 5 -8 showing up (i.e. a hunting party returning to the hideout in midst of the battle) but I can't explain how another 15-20 all of a sudden show up just for the sake of making it more challenging if the PCs were strolling through the smaller numbers.
2. HAVE A FLAREFUL CHALLENGE READY TO GO: I've never heard of a werewolf goblin. So, since these goblins rode black wolves and were called the Blackwolf Clan, I researched a bit discovered the god Malar, the Beastlord, and decided to have them worship him. Because of that, Malar gave the goblin boss the ability to change into a werewolf but without the damage immunities (none of the PCs had silver or magical weapons). But, this challenge was kept in my back pocket unless the Druid showed up OR if for some reason the PCs were simply easily running over the 43 goblins. As you know the werewolf showed up and made it more memorable. Who's ever heard of a goblin werewolf?
3. ON THE FLY DECISIONS: I added additional small monsters to the battle, 11 Stirges. At first, they were going to attack the PCs without question. But, as I saw what was happening, I decided on-the-fly to make their attack based on whether or not the goblin shaman was taking damage, succeeded or failed on concentration checks, and if he was killed or not. You know your encounters, therefore, you can think ahead of time, if it seems too easy, I'll add such and such. If it seems too hard for them or a smaller number of players show up, then I will remove or reduce such and such.
4. MAX THE HP: I also, based on earlier encounters, decided to start all the monsters at max HP. I will probably make this the case from now on. Since the PCs wouldn't know what each monster's HP was to start, I can easily make an on-the-fly downward adjustment, if need be, with any of them. Like I said, I want it to be a challenge, keep them on their toes and guessing "what now?", but I don't want to do a TPK if I can help it.
For example: When it came to the werewolf scene, the average HP is 58 but the max HP is 90. If the party is just waltzing over him, it doesn't seem fair to me to go oh, they killed him but I need to make it more challenging so let's make it 90 HP now. To me, it's much fairer to go, "Hmmm, they are having a tough time with this one. They have done 48 points of damage to him so far and he along with the other monsters are doing some damage to the party, let's drop his 90 to 58 and let them have a chance. They've fought hard so it will still be memorable."
5. HERE COMES THE CAVALRY: In the event, the whole experience was too overwhelming, I also prepared for the cavalry to come in and help. I had an NPC in my back pocket designed to be useful to the PCs but not be their savior and wipe out the goblins by himself. When they get to the orc stronghold, I will have a small group of soldiers from a nearby village ready to show up if needed. Possibly brought by the same druid. Either way, even as they go up in levels, I will have one or more NPCs in my back pocket ready to assist them. But only if absolutely necessary.
NOTE: The Principle of the Cavalry is very useful if not everyone shows up and you want to play what you've prepared. Have the players that showed up go ahead and play the session. Then, only if needed, simply have the "cavalry" show up (i.e. a single NPC that could be beneficial or group of NPCs). Just have a reasonable explanation of why they have shown up in the nick of time. For example, they are dungeon crawling searching for a tomb. As they come around a bend, they hear a group of people up ahead. They sound like they are looking for something also. It ends up that they have come across a group of NPCs that were there first or showed up after your players entered the dungeon. They are in search of something and work out a deal to join forces that particular session to find what each of them is looking for.
Though that was a lot of writing, NONE OF THAT took a lot of prep. Just a few adjustments. Because I prepped for the full party, it allowed me to also more easily make downward adjustments if needed.
ONE LAST NOTE: You can always have a one-shot ready to go for those nights you only have 2 or 3 players show up OR you just use the random chartsAppendixndex A of the DMG 5e to create a one-shot adventure and see where it leads. You can find and print out pre-generated characters for DND 5e at: http://dungeonsmaster.com/pre-generated-character-library-dndnext/
Plus, that is a great link if you need quick NPCs for your sessions.
Hope sharing my experience help to answer your question.