As the Googles will tell you, from Greek arkhetypon (ἀρχέτυπον): arkhē, meaning start, beginning, and typos, stamp, impression (originally: a blow). Literally: an initial stamp, an initial impression.
And the meaning the word had was pretty close to “archetype” from the beginning: LSJ
Adjective: “first-moulded as a pattern or model, archetypal”, used by Philo to refer to a seal, then “exemplary, ideal” by Soranus, to refer to a midwife.
Noun: “archetype, pattern, model”, used by Dionysius of Halicarnassus (contemporary of Philo); “a portrait [of Dido] as she really was” in the Anthologia Graeca.
So initially an archetype referred to the very first pressing of a seal on something—which is as close to the ideal pattern of the seal as possible. The more you use the seal, the more it wears out, just like a 10th-generation photocopy. From there, it was a short leap to the notion of the archetype: the initial model of everything.
And if Philo is one of the first persons attested to have used the word, he’s already using the metaphorical extension in his Allegorical Interpretation, III:
Now, Bezaleel, being interpreted, means God in his shadow. But the shadow of God is his word, which he used like an instrument when he was making the world. And this shadow, and, as it were, model, is the archetype of other things.
ἑρμηνεύεται οὖν Βεσελεὴλ ἐν σκιᾷ θεοῦ· σκιὰ θεοῦ δὲ ὁ λόγος αὐτοῦ ἐστιν, ᾧ καθάπερ ὀργάνῳ προσχρησάμενος ἐκοσμοποίει. αὕτη δὲ ἡ σκιὰ καὶ τὸ ὡσανεὶ ἀπεικόνισμα ἑτέρων ἐστὶν ἀρχέτυπον
On this account you will find the tabernacle and all its furniture to have been made in the first instance by Moses, and again subsequently by Bezaleel. For Moses fashioned the archetypal forms, and Bezaleel made the imitations of them.
διὰ τοῦθ’ εὑρήσεις τὴν σκηνὴν καὶ τὰ σκεύη πάντα αὐτῆς πρότερον μὲν ὑπὸ Μωυσέως, αὖθις δ’ ὑπὸ | Βεσελεὴλ κατασκευαζόμενα· Μωυσῆς μὲν γὰρ τὰ ἀρχέτυπα τεχνιτεύει, Βεσελεὴλ δὲ τὰ τούτων μιμήματα·