The sleep spell description says:
Casting Time: 1 action
Range: 90 feet
Creatures within 20 feet of a point you choose within range are affected... (Basic Rules p. 101)
Why is the radius only 20 feet if the range is 90 feet?
The sleep spell description says:
Casting Time: 1 action
Range: 90 feet
Creatures within 20 feet of a point you choose within range are affected... (Basic Rules p. 101)
Why is the radius only 20 feet if the range is 90 feet?
The range indicates how far you can target the centre point of the area of effect. The area of effect has its own range of 20' meaning any creature within that radius can be affected.
In the image below, all the blue circles are valid areas of effect. But the orange circle is centred outside the 90' range and so is invalid.
That's because your chosen point can be anywhere within 90 feet, could be right in front of you, or up to 90 feet away.
Once this point is chosen, anyone within 20 feet of it is affected by the spell.
The spell's range is defining where you can originate the area of effect for the spell. Similar to how fireball has a radius of 20' within a range of 150'.
From the Range section on page 202 of the PHB, "The target of a spell must be within the spell's range...For a spell like fireball, the target is the point in space where the ball of fire erupts."
When you cast sleep, you target a point. That point can be anywhere you can see, up to 90 feet from you. The radius of the spell effect (20'), which determines which creatures are caught in the effect, originates at that point.
Like fireball, you select a location, but the magic doesn't take affect until it reaches there. The spell isn't powerful enough to put 90ft of creatures to sleep, but it is versatile enough that you could hit an area that far away.