The Most High was seeking to kill Pharaoh’s son, not the son of Moses. Those verses are often taken out of context because of the wording and the way they oddly transition between each other.
22 And thou shalt say unto Pharaoh, Thus saith the Lord, Israel is my son, even my firstborn:
23 And I say unto thee (Pharaoh), Let my (GOD) son (Jacob/Israel) go, that he (Jacob/Israel) may serve me: and if thou (Pharaoh) refuse to let him (Jacob/Israel) go, behold, I will slay thy (Pharaoh) son , even thy firstborn.
24 And it came to pass by the way in the inn, that the Lord met him (Pharaoh’s son), and sought to kill him (Pharaoh’s son).
When looking at the context of these verses, why would GOD seek to kill Moses’ son for not letting the Hebrews go? It makes no sense. That alone shows that it wasn’t Moses’ son that the threat was being directed to. Moses was instructed to say those words to Pharaoh and they came to pass, because what was one of the plagues that befell Egypt? The death of the firstborn sons. Moses was basically sent to tell Pharaoh it was on sight.
Verse 25 and onwards is a completely separated instance involving Moses, his wife, and their son, who is being circumcised.
25 Then Zipporah took a sharp stone, and cut off the foreskin of her son, and cast it at his (Moses) feet, and said, Surely a bloody husband art thou to me.
26 So he (Moses) let him go: then she said, A bloody husband thou art, because of the circumcision.
The use of the word “Then” in verse 25 throws off the whole transition, making it seem as if that entire scenario happened consecutively but it didn’t. It was later on.
Zipporah was an Ethiopian woman. Her customs and culture was alien to that of Moses, who was a Hebrew man. Circumsion was/is an act of covenancy between Abraham’s bloodline descendants and The Most High. Seeing her son being cut up like that startled her, which is why she scolded Moses.
Also not being circumcised wasn’t necessarily an act punishable by death. At least, I don’t think it was. If I’m wrong, then my bad. But if not, again, what sense would it make for Moses’ son to be sought out for death?