Middle English, from Old English onforan, contraction of prepositional phrase on foran "before in place, at the beginning of, in front of," from on (prep.), see a- (1), + foran (adv.) "in front," dative of for. In some cases probably it represents Old English ætforan "at-fore."
Early 14c. as a preposition, "before in time," and as a conjunction, "earlier than the time when, before." Once the literary equivalent of before, it now has been replaced by that word except in nautical use, colloquial dialects, and in combinations such as aforesaid, aforethought.
"make mention of, speak of briefly or cursorily," 1520s, from mention (n.) or else from French mentionner, from Old French mencion. Related: Mentioned; mentioning. Not to mention as a "rhetorical suggestion that the speaker is refraining from presenting the full strength of his case" [OED] is by 1690s. Don't mention it as a conventional reply to expressions of gratitude or apology is attested from 1840.
<a href="https://www.etymonline.com/word/aforementioned">Etymology of aforementioned by etymonline</a>
Harper, D. (n.d.). Etymology of aforementioned. Online Etymology Dictionary. Retrieved $(datetime), from https://www.etymonline.com/word/aforementioned