Let's look at another messianic "prophecy" that EverAStudent cites:
Some of the prophecies that are pretty hard to account for except that they show the foreknowledge of God are: <snip> Messiah to be executed by crucifixion although Jews executed their own by stoning (Psalm 22:16, Zechariah 12:10, 13:6, John 20:25-29)
Psalm 22 does not say that it is predicting what will happen to the messiah. It is a lament poem describing what the author, putatively King David, was experiencing himself. It was turned into a messianic prophecy when Christians, viewing Jesus as the "Son of David", turned to all the Davidic psalms as source material on the life of Jesus, particularly the passages concerning (or which could be construed as concerning) David's trial at the hands of Ahithophel. As such, new meaning is inevitably read back into the source texts. For instance, there is nothing in Psalm 22:16 that of itself concerns capital punishment or crucifixion per se. It doesn't say that the messiah would be crucified. The text has to be read with this already in mind and with the subject ("me") already referring to the messiah for such a reading to be possible. Taken on its own terms, Psalm 22 is very much akin to what is in Job which unlike Psalms was not exploited as a source of OT "prophecy" because it does not have "Davidic" credentials. More specifically, the content in Psalm 22 is closely paralleled by similar poems in Babylonian literature, such as the Ludlul Bel Nemeqi. Compare: "My brother became my foe, my comrade beame a malignant demon, ... they assembled their host, together they came upon me ... My flesh was a shackle, my arms being useless, my person was a fetter, my feet having given way ... From writhing my joints were separated, my limbs were splayed and thrust apart .... Marduk, he restored me! He smote the hand of my smiter ... It was Marduk who put a muzzle on the mouth of the lion that was devouring me, Marduk took away the sling of my pursuer and deflected his slingstone". Psalm 22 is essentially a Hebrew attempt at this kind of text; it doesn't in any way present itself as a prophecy of the future.
The text in v. 16 is also highly difficult and likely corrupt. The MT has two variants in the verse: k-'ry "like a lion" and k'rw, which is uninterpretable. The dominant MT reading (found also in Symmachus) yields the following: "Dogs have surrounded me, a band of evil men has encircled me, like a lion my hands and my feet". This reading is awkward and likely wrong since the third clause lacks a verb (the Aramaic Targum supplies the missing verb "they bite" in order to improve the wording of the text). Or the three lines could be reparsed such that the verse is a bicolon (e.g. "As dogs a band of evil men has surrounded me, like a lion they encircle my hands and feet"). The spelling of 'ry "lion" is also at variance with 'ryh elsewhere in the same poem (v. 14, 22), suggesting that "lion" is not correct in v. 16. It is possible then that k'rw is older than k'ry and the latter was one solution influenced by the other references to lions in the poem. What makes k'rw uninterpretable is that no such root k'r exists in biblical Hebrew. The LXX interprets k'rw as deriving from the root krh or kwr "to dig", which is probably not correct (as there is an extraneous aleph). The LXX version of the verse thus states that "they dug my hands and my feet". This is the genesis of the "they pierced my hands and my feet" translation, which is biased by Christian crucifixion imagery, as "pierced" better fits the image of metal nails than "dug", but the correct translation of the Greek (and of krh, the root that the LXX supposes) is indeed "dug". The Old Latin versions use foderunt "they dug" as well (cf. Tertullian, Cyprian, Lactantius, Augustine, and Cassiodorus). The imagery in the LXX is not that of crucifixion but of a pack of dogs "digging" at the poet's hands and feet, clawing and biting at his limbs as he's fending them off. This image is reinforced by v. 20 in which the poet begs for salvation "from the paw/hand of the dog (m-yd klb)". Another possibility is that k'rw is either a corruption of kwrw "they bound, wrapped with cloth" (unattested in Hebrew but there is an Arabic root kwr "to wrap cloth around a body part, like a turban") or a double corruption of 'srw "they bound" (as in 1QH 5:37-38, which occurs in a similar poetic lament). Either of these is suggested by a third translation option (alongside "like a lion" and "they dug") in the ancient versions; Aquila's Greek version has epedésan "they have bound" in Psalm 22:16 and Jerome has Latin vinxerunt "they have bound" in his Psalterium Iuxta Hebraeos. If kwr existed as a Hebrew root which subsequently dropped out of the language (resulting in the confusion between versions), then the image is that of the hands being bound together with cloth (as fetters), and the same with the feet. But there is another fourth option that should also be considered. The root may well be Aramaic k'r "they soiled, marred" (= Hebrew k`r), which is precisely the correct philological form and thus it is possible that we have an Aramaism here. But this reading has no versional support like the others. So in the end, the meaning of Psalm 22:16 is very uncertain but in neither of the translation options is "crucifixion" really inherent in the text. Briggs' commentary of the Psalms accepts the LXX reading "they dig into my hands and feet", and notes that this refers to "the dogs with their teeth ... The extremities are first gnawed by the dogs. This is the translation best sustained by the Vrss. and the context. EV 'pierce' is not justified by the Hebrew word, and was due to a desire for a specific reference to the crucifixion" (Vol. 2, p. 196).
And what about Zechariah 12:10? This is another very difficult and textually uncertain passage. It occurs in an oracle that is parallel in many ways with the "Gog and Magog" oracle in Ezekiel 38-39, which envisions Jerusalem surrounded by all the nations of the earth rising up against the city, but with Yahweh spreading his tent of protection over the city and the clans of Judah like a torch "will consume the peoples round them to right and left" (v. 2-7). The scene is thus that of war and one in which the Jews successfully battled the foreigners besieging Jerusalem (such is the kind of text that encouraged the Zealots to fight against the Romans in AD 66-70). Yahweh promises that "I shall set myself to destroy all the nations who advance against Jerusalem", and with foreign domination ended, the House of David is restored on the throne of Jerusalem (v. 8-9). Once Davidic rulership is restored, Yahweh bestows on the House of David a spirit of kindness and prayer (v. 10). And here we come to the difficult passage that is cited as a messianic prooftext pertaining to the crucifixion of Jesus in the NT. But even without considering it, it is already apparent that the situation in Zechariah 12 is quite different than the circumstances of Jesus' passion. Jesus was not crucified at a time of war — a war in which the Gentiles besieging Jerusalem are utterly annihilated. This is parallel to the annihilation of Gog's armies "on the day Gog attacks the land of Israel" in Ezekiel 38:18-23 and 39:1-16. When the Jews receive the spirit of kindness, they begin to mourn and weep on account of a stabbed individual or individuals (v. 10). The author of John takes this figure to be Jesus on the cross, as he was mourned by his disciples.
What makes Zechariah 12:10 so difficult is that its Hebrew syntax can be parsed and understood in a myriad of ways, resulting in quite a few different renderings in the Greek versions. The best discussion of the complexities involved in the text of this verse can be found in M. J. J. Menken's Old Testament Quotations in the Fourth Gospel: Studies in Textual Form (1996), pp. 168-178. One common way of translating the MT as it was vocalized by the Masoretes is "They will look on me (hbytw 'ly) whom they have stabbed through ('t 'shr-dqrw)". The version closest to this reading is that of Theodotion, which survives in two variant forms: "They shall look on me (epiblepsontai pros me) whom they have pierced (hon exekentésen)" and "They shall look on me, to whom they have pierced (eis hon exekentésen)". The Latin Vulgate understands the verse similarly: "They will look to me (aspicient ad me) whom they have pierced (quem confixerunt)". This reading however is exegetically difficult because there is nothing elsewhere in the text about the Jews piercing God; even worse is the fact that reference switches in the next main clause from the first person to the third. The author of the gospel of John read the text differently. He vocalized 'ly as 'eley (poetic form of the preposition "to") instead of the Masoretic 'elay "on me" (a minority of MT MSS, incidentally, vocalize 'ly as 'eley), and translated 'eley with the Greek preposition eis: "They will look (opsontai) to the one whom they pierced (eis hon exekentésen)". The second Theodotionic variant thus appears to be a compromise between these two readings. The Johannine version no longer has gaze directed at God per se, and it lacks the problem of pronoun reference shifting from the first to the third person. Aside from the ambiguity with 'ly, the grammatical phrase 't 'shr is also problematic. The above translations take it in its usual sense as heading an accusative relative clause. But 't "with" can function outside the relative clause as setting up a double object construction. The translation of Aquila understands the text in this sense, "They will look on me with the one whom they pierced (sun hó exekenteesan)". Here 't is rendered with sun "with", sharply distinguishing "the one whom they pierced" from God. Contrary to how the author of John understands the scripture, the pierced one is not the object of gaze in Aquila; the pierced one rather is accompanying those who are gazing at God. Yet another way of understanding the Hebrew can be found in the LXX. The wording is quite unusual at first glance because of how the second verb is represented: "They shall look to me (epiblepsontai pros me) because they have danced triumphantly (anth' hón katórkhesanto)". The dancing actually makes sense in the context of the chapter because v. 10 follows the depiction of Jewish victory over their enemies, but there is actually a textual corruption in the Vorlage or the translator misread the verb; here dqrw is misread as rqdw "they have danced". If we substitute the correct verb, the sense is rather: "They shall look to me because they have pierced [others] (anth' hón exekentésen)". This also makes very good sense of the context because this follows the slaughtering of the nations by the "clans of Judah" (v. 6), and the people look to their God and mourn those they killed like their own children. The LXX anth' hón "because" (which occurs frequently as a causal conjunction in the LXX, cf. Genesis 22:18 LXX, 26:5 LXX, Leviticus 26:43 LXX, Numbers 25:13 LXX, etc.) takes 't as an accusative of limitation (see Joüon, 126g), analogous to how it is used in Exodus 6:3 ("you shall circumcise yourselves in respect of ['t] the flesh of your foreskin"), 1 Kings 15:23 ("he was ill as to ['t] his feet"), and elsewhere. A. S. van der Woude thus translates the Hebrew in his critical commentary as "They shall look on me on account of the one whom they have pierced". The JPS version reads "They shall look unto me because they have thrust him through," the Judaica Press translation reads "They shall look to me because of those who have been thrust through", and the ArtScroll version reads "They will look toward me because of those whom they have stabbed". The text is ambiguous as to whether the figure is an individual or a collective and the use of the singular pronoun in the rest of the verse is not decisive since the singular and plural are both used with collective entities (cf. Hosea 11:1-2). The simplest way of expressing this in English is: "They shall look to me on account of whom they stabbed" (here there is no commital on whether the stabbees are singular or plural).
The text is difficult and there is a good deal of disagreement about which reading best represents what the author intended. But the reference to stabbing (dqr) is likely connected to the war described in the preceding verses. Normally dqr refers to the through-and-through stabbing of a person by a sword or other weapon in battle (Numbers 25:8, Judges 9:54, 1 Samuel 31:4, Isaiah 13:15, Jeremiah 37:10, 51:4, etc.). This is quite different from the poking of Jesus' side with a spear in a non-martial context as described in John 19:17. The passage in Zechariah 12:10 also may have mortal stabbing in battle in view because the very next verse (v. 11) compares the mourning of the pierced to the mourning at Hadad-Rimmon on the plain of Megiddo, likely where Josiah was killed in battle (2 Kings 23:28-30, 2 Chronicles 35:20-27). The link with Josiah suggests that a single kingly, messianic figure may be in view here, as there is indeed such a figure in 9:9-10. Later rabbinical interpretation of the verse took this approach, viewing the Messiah ben Ephraim as the lesser messianic figure who dies in advance of the larger Messiah. But nowhere does the messianic figure of 9:9-10 reappear in the battle described in ch. 12, and there is no mention of such a figure dying, whether in battle (which is wholly inconsistent with v. 8), much less stabbed by his own people. The stabbing is only mentioned obscurely in retrospect. The context imo better supports a reading that interprets the stabbing as pertaining to those killed in battle in v. 6; it would be unusual to mourn for one's enemies which explains why it specifically results from the bestowal of the "spirit of kindness" from God. In support of this reading is the very detailed way in which the mourning is depicted as occurring "clan by clan" within Judah; in v. 12-14, the word mshpchwt "clan" occurs an astonishing 9 times. This emphasis on each and every clan involved in the mourning has its antecedent in v. 6: "When that day comes I will make the clans ('lp, another word for "clan") of Judah like a brazier burning in a pile of wood, like a flaming torch in stubble, and they will consume the peoples round them to right and left". In any case, the verse is open to quite a few different interpretations and in no sense requires the application that John gives to it.