Knowing that Ezekiel 38-39 is for the last days just prior to Christ's second coming is easy. All one needs to do is read.
Ezek 38:1-23
1 And the word of the LORD came unto me, saying,
2 Son of man, set thy face against Gog, the land of Magog, the chief prince of Meshech and Tubal, and prophesy against him,
3 And say, Thus saith the Lord GOD; Behold, I am against thee, O Gog, the chief prince of Meshech and Tubal:
The reference to the chief prince of Meshech and Tubal is to the area known as Russia. All one need do is look at Russia's allies in the world today to recognize this band is joining together against God's people today.
4 And I will turn thee back, and put hooks into thy jaws, and I will bring thee forth, and all thine army, horses and horsemen, all of them clothed with all sorts of armour, even a great company with bucklers and shields, all of them handling swords:
5 Persia, Ethiopia, and Libya with them; all of them with shield and helmet:
6 Gomer, and all his bands; the house of Togarmah of the north quarters, and all his bands: and many people with thee.
Persia (Iraq-Iran), Ethiopia (Sudan, which used to be part of Ethiopia), Libya (needs no explanation), Gomer (areas around Armenia near Russia, and Togarmah (areas near Turkey). Only Turkey is not allied with Russia against the West today, yet.
7 Be thou prepared, and prepare for thyself, thou, and all thy company that are assembled unto thee, and be thou a guard unto them.
8 After many days thou shalt be visited: in the latter years thou shalt come into the land that is brought back from the sword, and is gathered out of many people, against the mountains of Israel, which have been always waste: but it is brought forth out of the nations, and they shall dwell safely all of them.
9 Thou shalt ascend and come like a storm, thou shalt be like a cloud to cover the land, thou, and all thy bands, and many people with thee.
10 Thus saith the Lord GOD; It shall also come to pass, that at the same time shall things come into thy mind, and thou shalt think an evil thought:
11 And thou shalt say, I will go up to the land of unwalled villages; I will go to them that are at rest, that dwell safely, all of them dwelling without walls, and having neither bars nor gates,
12 To take a spoil, and to take a prey; to turn thine hand upon the desolate places that are now inhabited, and upon the people that are gathered out of the nations, which have gotten cattle and goods, that dwell in the midst of the land.
13 Sheba, and Dedan, and the merchants of Tarshish, with all the young lions thereof, shall say unto thee, "Art thou come to take a spoil? hast thou gathered thy company to take a prey? to carry away silver and gold, to take away cattle and goods, to take a great spoil?"
14 Therefore, son of man, prophesy and say unto Gog, Thus saith the Lord GOD; In that day when My people of Israel dwelleth safely, shalt thou not know it?
15 And thou shalt come from thy place out of the north parts, thou, and many people with thee, all of them riding upon horses, a great company, and a mighty army:
16 And thou shalt come up against My people of Israel, as a cloud to cover the land; it shall be in the latter days, and I will bring thee against My land, that the heathen may know Me, when I shall be sanctified in thee, O Gog, before their eyes.
The heathen don't know Who The GOD is until that event that's set to occur prior to Christ's return. After Christ's second coming during His Millennium reign, all nations will know Who GOD is, and will be required to go up to Jerusalem year after year to worship Christ The King (per end of Zech.14). This event of the northern armies out of the northern quarters coming upon Israel is on the last day of this present world just prior to Christ's coming; it's the Luke 21 event of the armies surrounding Jerusalem on the last day of this world. Christ showed there that's what will usher in His second coming.
17 Thus saith the Lord GOD; Art thou he of whom I have spoken in old time by My servants the prophets of Israel, which prophesied in those days many years that I would bring thee against them?
18 And it shall come to pass at the same time when Gog shall come against the land of Israel, saith the Lord GOD, that My fury shall come up in My face.
19 For in My jealousy and in the fire of My wrath have I spoken, Surely in that day there shall be a great shaking in the land of Israel;
20 So that the fishes of the sea, and the fowls of the heaven, and the beasts of the field, and all creeping things that creep upon the earth, and all the men that are upon the face of the earth, shall shake at My presence, and the mountains shall be thrown down, and the steep places shall fall, and every wall shall fall to the ground.
21 And I will call for a sword against him throughout all My mountains, saith the Lord GOD: every man's sword shall be against his brother.
22 And I will plead against him with pestilence and with blood; and I will rain upon him, and upon his bands, and upon the many people that are with him, an overflowing rain, and great hailstones, fire, and brimstone.
23 Thus will I magnify Myself, and sanctify Myself; and I will be known in the eyes of many nations, and they shall know that I am the LORD.
(KJV)
That's the Rev.16 Armageddon event, set to occur on the last day of this present world with Christ's second coming. That will occur prior to Christ's "thousand years" reign of Rev.20.
Ezek 39:1-40:49
1 Therefore, thou son of man, prophesy against Gog, and say, Thus saith the Lord GOD; Behold, I am against thee, O Gog, the chief prince of Meshech and Tubal:
2 And I will turn thee back, and leave but the sixth part of thee, and will cause thee to come up from the north parts, and will bring thee upon the mountains of Israel:
A sixth part of these are left after God's wrath upon that northern army, which is shown in the Zech.14 Scripture of those nations left that will have come up against Jerusalem on the last day of this present world. With those of Rev.20:8, none of them are left. That reveals these not destroyed at Christ's coming with the battle of Armageddon will remain throughout Christ's "thousand years" reign, and most likely be part of the final Gog and Magog of Rev.20:8 that Satan leads upon the "camp of the saints" at the end of Christ's Millennium reign.
3 And I will smite thy bow out of thy left hand, and will cause thine arrows to fall out of thy right hand.
4 Thou shalt fall upon the mountains of Israel, thou, and all thy bands, and the people that is with thee: I will give thee unto the ravenous birds of every sort, and to the beasts of the field to be devoured.
5 Thou shalt fall upon the open field: for I have spoken it, saith the Lord GOD.
6 And I will send a fire on Magog, and among them that dwell carelessly in the isles: and they shall know that I am the LORD.
7 So will I make My holy name known in the midst of My people Israel; and I will not let them pollute My holy name any more: and the heathen shall know that I am the LORD, the Holy One in Israel.
8 Behold, it is come, and it is done, saith the Lord GOD; this is the day whereof I have spoken.
That's the great battle to end this present world at Christ's second coming, the battle of Armageddon (Rev.16). It's the great supper of God per Rev.19 when the fowls will eat the flesh of the wicked.
9 And they that dwell in the cities of Israel shall go forth, and shall set on fire and burn the weapons, both the shields and the bucklers, the bows and the arrows, and the handstaves, and the spears, and they shall burn them with fire seven years:
10 So that they shall take no wood out of the field, neither cut down any out of the forests; for they shall burn the weapons with fire: and they shall spoil those that spoiled them, and rob those that robbed them, saith the Lord GOD.
11 And it shall come to pass in that day, that I will give unto Gog a place there of graves in Israel, the valley of the passengers on the east of the sea: and it shall stop the noses of the passengers: and there shall they bury Gog and all his multitude: and they shall call it The valley of Hamongog.
12 And seven months shall the house of Israel be burying of them, that they may cleanse the land.
13 Yea, all the people of the land shall bury them; and it shall be to them a renown the day that I shall be glorified, saith the Lord GOD.
14 And they shall sever out men of continual employment, passing through the land to bury with the passengers those that remain upon the face of the earth, to cleanse it: after the end of seven months shall they search.
15 And the passengers that pass through the land, when any seeth a man's bone, then shall he set up a sign by it, till the buriers have buried it in the valley of Hamongog.
16 And also the name of the city shall be Hamonah. Thus shall they cleanse the land.
Hamongog nor the city of Hamonah does not yet exist.
17 And, thou son of man, thus saith the Lord GOD; Speak unto every feathered fowl, and to every beast of the field, Assemble yourselves, and come; gather yourselves on every side to My sacrifice that I do sacrifice for you, even a great sacrifice upon the mountains of Israel, that ye may eat flesh, and drink blood.
18 Ye shall eat the flesh of the mighty, and drink the blood of the princes of the earth, of rams, of lambs, and of goats, of bullocks, all of them fatlings of Bashan.
19 And ye shall eat fat till ye be full, and drink blood till ye be drunken, of My sacrifice which I have sacrificed for you.
20 Thus ye shall be filled at My table with horses and chariots, with mighty men, and with all men of war, saith the Lord GOD.
21 And I will set My glory among the heathen, and all the heathen shall see My judgment that I have executed, and My hand that I have laid upon them.
22 So the house of Israel shall know that I am the LORD their God from that day and forward.
That's the supper of Rev.19 again from God's wrath on the last day of this world. At that time the scattered tribes of the "house of Israel" will then know The LORD their God from that day forward. That will occur with Christ's second coming to gather the "house of Israel" per the OT prophets. At the end of Christ's "thousand years", those will have already been gathered, once again marking these Ezek.38-39 events for the end of this present world, and not after Christ's thousand years reign.
23 And the heathen shall know that the house of Israel went into captivity for their iniquity: because they trespassed against Me, therefore hid I My face from them, and gave them into the hand of their enemies: so fell they all by the sword.
24 According to their uncleanness and according to their transgressions have I done unto them, and hid My face from them.
25 Therefore thus saith the Lord GOD; Now will I bring again the captivity of Jacob, and have mercy upon the whole house of Israel, and will be jealous for My holy name;
26 After that they have borne their shame, and all their trespasses whereby they have trespassed against Me, when they dwelt safely in their land, and none made them afraid.
27 When I have brought them again from the people, and gathered them out of their enemies' lands, and am sanctified in them in the sight of many nations;
28 Then shall they know that I am the LORD their God, which caused them to be led into captivity among the heathen: but I have gathered them unto their own land, and have left none of them any more there.
29 Neither will I hide My face any more from them: for I have poured out My spirit upon the house of Israel, saith the Lord GOD.
That gathering of the ten tribed "house of Israel" will happen at Christ's second coming, not after the Rev.20 thousand years. That's another marker to show this Ezek.38-39 event is for the end of this present world, and not after Christ's Millennium reign. It's so... easy!