Interfacing of CO2 sensor module with Arduino ATMega328 through ttl

Have a look at the examples in Serial Input Basics - simple reliable ways to receive data. There is also a parse example.

I'm not sure if SoftwareSerial works well at 19200 baud. And it cannot listen while it is transmitting. Maybe have a look at NeoSWSerial

If that does not work I suggest you get an Arduino with 2 or more HardwareSerial ports - such as a Mega or Micro.

...R