First project: CO2 and Temperature with Arduino Nano

Is the code you posted the entire code you are compiling? That seems very unlikely to need that much memory.

Where did you get the library for the CO2 sensor?