Uv Sphere Unwrap Perfect Square
I personally like to think of this backwards



see this link or this other one that mean starting with an unwrapped plane and making a sphere out of it, to avoid using a UVsphere and the triangle fans at the poles.

But if you want to use a UVsphere here's an alternative:

In edit mode go to front back or a side view, chose an edge loop and mark a seam.

Switch to face selection and choose a face adjacent to the seam, that will make it the "active face".

Press A to deselect everything and press A again to select all. You will see that the previously selected face is still the active face.

Press U to unwrap, and choose "follow active quads" and then press on OK using the default values



That will give you a perfect grid UV map, but the map will be much larger than the UV space.



you can scale it down to fit within the image you want to use.