And the glass in a greenhouse (a) traps the air inside in an enclosed space so it cannot mix with the rest of the atmosphere and (b) stays put.
Carbon dioxide cannot act as a greenhouse because it does not stay put, it moves.
To be fair, your post is not entirely correct. Several gases in our atmosphere do indeed react with inbound and reflected light (albedo) to heat certain layers of our atmosphere
i REMEMBER THE OLD “GREENHOUSE EFFECT” from the 1950s and 1960s.
I also remember the 1980s when POPULAR SCIENCE MAGAZINE editorialized they would no longer use the term “Greenhouse Effect” as it was not true.
Ten years later they were hollering about “glo-bull warming”.