First look at the answer at Imperfect Indicative Active in John 1:1-4
related to ἦν.
ὁ ὀπίσω μου ἐρχόμενος ⸆ ἔμπροσθέν μου γέγονεν,* ὅτι πρῶτός μου ἦν.
(John 1:15b, NA28)
‘He who comes [by birth] after me has a higher rank than I, for He existed before me.’”
(John 1:15b, NASB95)
When before/(in front of) him means "greater in rank" that is equal ot "mightier than." The ἦν at the end essentially has the meaning that Jesus already was before John did. Thus, you cannot use it to say Jesus had a beginning other that his life here on Earth. The γέγονεν (became) means he attained a higher rank here on Earth. Otherwise, it contradicts the next phrase.
Also look at the parallel statements (probably a difference in translation and summarizing John the Baptist's statements):
He who is coming after me is mightier than I, and I am not fit to remove His sandals
(Matt 3:11, NASB; similarly in Mark 1:7; Luke 3 16)
Note: ἔρχομαι and γίνομαι in John 1:1-18 when referring to Christ, refers to his coming and life here on Earth (see v9, v11, and v14). When referring to Jesus' deity it is ἦν. When referring to his humanity on Earth it is ἔρχομαι and γίνομαι. Before Jesus began is public ministry, John ranked higher in the eyes of the people. But, when Jesus began his pulblic ministry after John, he soon ranked higher than John in the eyes of the people. See John 3:30, "He must increase, but I must decrease." (ESV)
(John testified concerning Him and exclaimed,
“This was the One of whom I said,
‘The One coming after me has surpassed me,
because He existed before me.’ ”)
(John 1:15, HCSV)
Maybe translating it this way makes more sense.
He who comes behind me, has moved in front of me, because he existed before me.
After me (ὀπισω μου [opisō mou]). See also 1:27. Later in time John means. He described “the Coming One” (ὁ ἐρχομενος [ho erchomenos]) before he saw Jesus. The language of John here is precisely that in Matt. 3:11 ὁ ὀπισω μου ἐρχομενος [ho opisō mou erchomenos] (cf. Mark 1:7). The Beloved Disciple had heard the Baptist say these very words, but he also had the Synoptic Gospels. Is become (γεγονεν [gegonen]). Second perfect active indicative of γινομαι [ginomai]. It is already an actual fact when the Baptist is speaking. Before me (ἐμπροσθεν μου [emprosthen mou]). In rank and dignity, the Baptist means, ὁ ἰσχυροτερος μου [ho ischuroteros mou] “the one mightier than I” (Mark 1:7) and ἰσχυροτερος μου [ischuroteros mou] “mightier than I” (Matt. 3:11). In John 3:28 ἐμπροσθεν ἐκεινου [emprosthen ekeinou] (before him, the Christ) does mean priority in time, but not here. This superior dignity of the Messiah John proudly recognizes always (John 3:25–30). For he was before me (ὁτι πρωτος μου ἠν [hoti prōtos mou ēn]). Paradox, but clear. He had always been (ἠν [ēn] imperfect) before John in his Pre-incarnate state, but “after” John in time of the Incarnation, but always ahead of John in rank immediately on his Incarnation. Πρωτος μου [Prōtos mou] (superlative with ablative) occurs here when only two are compared as is common in the vernacular Koiné. So the Beloved Disciple came first (πρωτος [prōtos]) to the tomb, ahead of Peter (20:4). So also πρωτον ὑμων [prōton humōn] in 15:18 means “before you” as if it were προτερον ὑμων [proteron humōn]. Verse 30 repeats these words almost exactly.
Robertson, A. T. (1933). Word Pictures in the New Testament (Jn 1:15–16). Broadman Press.
- He [John] compares him to himself with respect to dignity when he says, he ranks ahead of me [ante me factus est, literally, he “was made before me”]. It should be noted that it is from this text that the Arians took occasion for their error. For they said that “He who comes after me,” is to be understood of Christ as to the flesh he assumed, but what follows, “was made before me,” can only be understood of the Word of God, who existed before the flesh; and for this reason Christ as the Word was made, and was not coeternal with the Father.
According to Chrysostom, however, this exposition is stupid, because if it were true, the Baptist would not have said, he “was made before me, because he existed before me,” since no one is unaware that if he was before him, he was made before him. He rather would have said the opposite: “He was before me, because he was made before me.” And so, according to Chrysostom, these words should be taken as referring to his [Christ’s] dignity, that is, he was preferred to me and placed ahead of me. It is as though he said: Although Jesus came to preach after me, he was made more worthy than I both in eminence of authority and in the repute of men: “Gold will not be equal to it” (Jb 28:17). Or alternatively: he is preferred ahead of me, that is, before my eyes, as the Gloss says and as the Greek text reads. As if to say: Before my eyes, i.e., in my sight, because he came into my view and was recognized.
- He compares him to himself with respect to their duration, saying, because he existed before me. As if to say: He was God from all eternity, I am a frail man of time. And therefore, even though I came to preach ahead of him, yet it was fitting that he rank before me in the reputation and opinion of men, because he preceded all things by his eternity: “Jesus Christ is the same yesterday, today, and forever” (Heb 13:8). “Before Abraham came to be, I am,” as we read below (8:58).
If we understand this passage as saying that he “was made before me,” it can be explained as referring to the order of time according to the flesh. For in the instant of his conception Christ was perfect God and perfect man, having a rational soul perfected by the virtues, and a body possessed of all its distinctive features, except that it lacked perfect size: “A woman shall enclose a man,” i.e., a perfect man (Jer 31:22). Now it is evident that Christ was conceived as a perfect man before John was born; consequently he says that he “was made before me,” because he was a perfect man before I came forth from the womb.
Thomas Aquinas. (2010). Commentary on the Gospel of John: Chapters 1–21 (F. Larcher & J. A. Weisheipl, Trans.; Vol. 1, pp. 80–81). The Catholic University of America Press.
1:15. Because v. 16 would follow nicely on v. 14, some have seen v. 15 as an interpolation. It would be fairer to conclude that v. 15 is a planned parenthetical remark. The earlier mention of the witness of John the Baptist (vv. 6–8) dealt with the coming of the pre-existent light into the world; this verse abandons that theme and grounds the glory of the incarnate Word in a concrete individual, a concrete ‘he’ attested by another individual. Thus it prepares the way for the detailed account of the Baptist’s witness, which immediately succeeds the Prologue.
The present tense (John testifies concerning him) followed immediately by the perfect tense (lit. ‘he has cried out’) combine to suggest the Evangelist is presenting John the Baptist’s witness both vividly, as if it were in progress, and comprehensively, summing it up as a set-piece. Before the Baptist was able to point to a specific individual (cf. v. 33), he was able to announce in general terms the advent of the long-awaited Coming One: He who comes after me has surpassed me because he was before me. In all four Gospels, Jesus entered public ministry after John. In a society where age and precedence bestowed peculiar honour, that might have been taken by superficial observers to mean John the Baptist was greater than Jesus. Not so, insists the Baptist: Jesus has surpassed him (lit., ‘became before me’), precisely because he was before him. The peculiar expression means ‘because he was first with respect to me’. It includes not only temporal priority (cf. NEB, ‘before I was born, he already was’), which picks up the pre-existence emphasized at the beginning of the chapter, but also absolute primacy. That was the Baptist’s proclamation before he knew of whom he spoke. Then, after identifying him, he could say, This was he of whom I said, etc. And by placing this summary of the Baptist’s witness here, the Evangelist by anticipation is identifying Jesus with the Word-made-flesh: ‘This was he of whom I spoke.’
Carson, D. A. (1991). The Gospel according to John (pp. 130–131). Inter-Varsity Press; W.B. Eerdmans.