This article gives an excellent idea of the amount of land to power all of the US using solar panels. Note that the 20,000 sq. mi figure is revised to 10,000 sq. mi or a 100 by 100 mile square that would easily fit in the Mojave Desert, assuming rooftop solar was on most homes.
https://www.freeingenergy.com/how-much-solar-would-it-take-to-power-the-u-s/
*****
Later the article gives a link to a map that shows how much land it would take to power the whole world using solar alone.
https://landartgenerator.org/blagi/wp-content/uploads/2009/08/AreaRequired1000.jpg
*****
Later the article links to a map that shows how much ocean it would take to power the world with offshore wind turbines. This is a .PDF.
https://landartgenerator.org/blagi/wp-content/uploads/2009/08/AreaRequiredWindOnly.pdf