Under the influence of ultraviolet radiation present in sunlight, a special pigment is produced in the skin that intensely reflects this part of the solar spectrum. At the same time, the skin acquires a characteristic shade (aka tan), and the likelihood of getting a burn decreases.
Most ordinary window glass prevents ultraviolet rays from passing through. Therefore, sunlight passing through the glass will not cause tanning. A tan can only be obtained through quartz glass, which is transparent to ultraviolet radiation.
The activation of the mechanism for the production of melanin (sunburn) does not cause all ultraviolet rays, but only those lying in a very narrow frequency range. Then the transmission of UV rays in some other range will still not lead to tanning.
It is theoretically possible to tan through ordinary glass, since it perfectly transmits ultraviolet light - but only soft, UV-A (from 315 to 400 nm). The mechanism of tanning for such rays is completely different, and it will take hundreds of times longer to sunbathe!
P.S. Science, of course, is science, but you can easily sunbathe through the glass, so the drivers will definitely understand me.