You can't install Windows 11 on a system with 2GB of RAM because it runs a system compatibility check before attempting an installation, and if it doesn't see 4GB of RAM, it will abandon the installation.
And this is a good thing.
Also: What graphics card do I have? How to check your GPU and drivers
This doesn't mean you can't run Windows 11 on a system with 2GB of RAM. The easiest way around the restriction is to have 4GB of RAM fitted while Windows 11 is installing, then fit 2GB after it's done. But that will lead to a laggy, sluggish, painful experience.
Back in the Windows 10 days, you could install 32-bit Windows on a PC with only 1GB of RAM. The 64-bit version doubled this minimum to 2GB. And that really was the bare minimum. You could work with it, but it could get painful at times.
For Windows 11, things have changed, and Microsoft has increased the minimum to 4GB. It's a big increase, but oddly enough, it quickly feels like a minimum. I've seen systems where after everything has booted up, the system has about one gigabyte free.