˹He is˺ the Originator of the heavens and earth. How could He have children when He has no consort? He created all things and has ˹perfect˺ knowledge of everything.(6:101)
This verse says that Allah has no son because he has no consort. This verse is implying that Allah can not have a son because he does not have a partner.
But Allah is omnipotent he can do everything .
Commentary by Ibn kathir
How can He have children when He has no wife! for the child is the offspring of two compatible spouses. Allah does not have an equal, none of His creatures are similar to Him, for He alone created the entire creation.
So the question comes if Allah is all powerful then why can't he have a son without a partner? . Because the verse indirectly say that he can not have a son because he does not have a partner.