Limit your time riding when you first start out.
When you are a new rider limit the duration of your rides for a few months. Initially, after 30 minutes your concentration will start to slip. Later, after an hour or two your concentration will start to slip.
Actually, I have been riding for years and I still don't like road rides that last more than 3 -4 hours. I often make 1 stupid mistake after I ride for 3 hours. Even if I take a short break every hour, the ability to ALWAYS compensate for others' stupid moves seems to deteriorate after a few hours.
One time I missed a red light and almost ran it. Another time I passed stopped vehicles on the right to go ahead and turn right…. I should have waited till the light turned green.