DNA cannot leave the nucleus of the cell, so your cells create mRNA using the DNA pattern, and mRNA carries the instructions for protein synthesis outside of the nucleus. However, DNA holds the original codes.
DNA is the genetic material and carries the genetic code. The genetic code of DNA is copied into mRNA. The mRNA leaves the nucleus and enter cytoplasm to join ribosomes. Ribosomes are the site of protein synthesis. So, the code copied in the nucleotide sequence of mRNA is translated into the amino acid sequence of proteins.
Hence, DNA provides the master code for protein synthesis.