In prokaryotes (no nucleus), mRNA is transcribed from DNA and immediately translated by the ribosomes to assemble proteins.
In eukaryotes (with a nucleus), the mRNA can be modified in several ways before being translated by ribosomes
The nucleus enables this separation of transcription and translation of DNA
This allows a single gene to be expressed in multiple ways