In almost all cases placing your birds cage next to a closed window does not provide the bird with any UV-B.
In-fact, as glass allows Infra-Red to pass through quite well, we only increase the risk of birds dangerously overheating.
Most glass and plastics act as a 100% UV stop. Placing your bird near a window may be nice, it may increase its exposure to visible light, but the bird will not be benefitting in full from the sun.
Full-spectrum+UV-B bird lamps work to replicate the sun is a gentle, safe and measured way, allowing the bird to benefit in full from natural exposure to the full range of the terrestrial wavelengths of daylight.