With Windows being componentized, this is often a lot easier than it used to be - there's official minimal editions like the forgotten Nano Server (or an attempt at remaking it like remin-core: https://github.com/replisys/remin-core), IoT, Factory OS and whatnot, but even adding the legacy GUI subsystem you can get somewhat small when building Windows PE variants like used for the default setup/recovery images.
At least a few years ago some of this trend was still alive making little PE images that could almost be used for real desktop use on sites like reboot.pro and other spin-offs, though it seems to be a lot less mainstream than the piracy heydays during the XP era.