The exon is the portion of the genome that encodes protein synthesis, if I understand correctly.
But, this exon is apparently less than 5% of the genome.
So, what does the rest of the genome do?
A few percent codes for RNA, like microRNA, long non coding RNA, shRNA ect. These RNA while not translated into protein do have a function.
Some RNA are ribozymes, catalytically active in their own right, but they do work with proteins. An example of such complex is the ribosome, where the catalytic peptidyl transferase activity that links amino acids together is performed by the ribosomal RNA https://en.wikipedia.org/wiki/Ribosome
Then there are miRNA, that control gene expression by RNA mediated silencing. https://en.wikipedia.org/wiki/RNA_silencing
Then there lncRNA... these long RNA can regulate gene activity by binding to transcription factors. So a cell can maintain a high concentration of transcription factor in an inactive state that can rapidly go into use once a signal is received. This is rather recent discovery.
About 45% of the human genome is composed of what is essentially viral parasites. While some of these viral genomes are full functional and encode endogenous viruses (this is why there is come concern about xeno tissue transplant). Most of these viral parasites have degraded somewhat, having accumulated mutations that either render unable to leave the cell, but still able to replicate and multiple in the genome (we call them transposable elements), or are completely inactive (repeat elements). https://www.ncbi.nlm.nih.gov/pmc/articles/PMC4124830/
Examples are Alu element make up 10.7% of the human genome. It is rather old parasite... youngest expansion is about 30 million years old. Mostly inactive, although some Alu elements are still active. https://en.wikipedia.org/wiki/Alu_element
Line repeats. ~17% of the human genome.
Some DNA is structural. The centromeric repeat array which may be several Mb long per chromosome (exact length is unknown due to variation between people and difficulty to clone and maintain for analysis). Here the DNA serves as a pad over which the kinetochore forms. This DNA tend to be transcriptionally quiet, few if any genes.
And there are pseudo genes... genes that are no longer active due to mutations.