As long as the beginner cyclist is pretty fit and takes it slower when covering the 20 miles the first time they certainly can ride the bicycle 20 miles.
A beginner may take longer to cover the same 20 miles distance than a more advanced cyclist.
If you ride your bicycle at 12 miles per hour then you could ride the 20 miles in a little under 2 hours or maybe 2 hours and 30 minutes depending on how often you stop and take a break.
As a beginner cyclist you may ride a bit slower and may want to stop and take a break during that 20 mile bike ride.
If it's warm or hot out you also need to drink plenty of fluids to stay hydrated so you'll be stopping to drink some water or other hydrating drink.
It might take a beginner 3 hours to ride a bike 20 miles but as you get more advanced and ride your bike more often longer distances then you may be able to cover the 20 miles much sooner.