When I take a screenshot of my screen, will the screenshot have the same number of pixels as my screen?

Let's say my screen is 1080×1080, and I take a screenshot, will my screenshot have 1080x1080x3 pixels? Or is the resolution of the screenshot invariant to the screen settings? Or is it the monitor screen, that is, if I choose a lower resolution on a very high definition monitor and take a screenshot, the screenshot will be the monitor resolution, the screen configuration or it could be completely different at two?