The main function of RNA is to generate protein by means of translation which is the process of translating the chain of a messenger RNA molecule to a chain of amino acids in a protein synthesis.
RNA brings the genetic information that is translated by ribosomes into different proteins essential for cellular processes.