The early universe contained only the lightest elements, hydrogen and helium  Heavier elements, such as carbon, form only in nuclear reactions in stars and are dispersed when the stars explode
A recently discovered gas cloud contained carbon several billion years ago, when the universe was no more than two billion years old
The gas cloud also contained hydrogen and helium.