What was the מֹּ֑לֶךְ Molek idol in Leviticus 18:21?
"Do not allow any of your offspring to be offered up to Molek, and do not profane the name of your God: I am YHVH." ( וּמִֽזַּרְעֲךָ֥ לֹא־תִתֵּ֖ן לְהַעֲבִ֣יר לַמֹּ֑לֶךְ וְלֹ֧א תְחַלֵּ֛ל אֶת־שֵׁ֥ם אֱלֹהֶ֖יךָ אֲנִ֥י יְהוָֽה )
Ibn Ezra explains :
Molekh the name of an idol. Our Sages, of blessed memory, have interpreted this word [Sanhedrin 64a] as a general term for anything that someone may set on a throne [Hebrew: yamlikh] to rule over him. In all likelihood, however, it is also the name of a specific Ammonite abomination [I Kings 11:7].
Rashi explains how nations would sacrifice their children to Molek:
[AND THOU SHALT NOT LET ANY OF THY SEED PASS THROUGH THE FIRE] TO MOLECH — This was an idol the name of which was "Molech", and this was the manner in which it was worshipped: that he (the father) handed his child (lit., his son, but it applies to his daughter also; cf. Deuteronomy 18:10) over to the priests of the idol. These lit two large pyres one opposite the other and made the child to pass on foot between the two pyres (Sanhedrin 64b).
Ibn Ezra describes the child sacrifices to the Molek idol :
to hand over meaning, to burn — for this was the manner of its worship. Others say that the child was passed over a fire: some survived, and others died. Still others point out that the verse nowhere mentions fire, and that the commandment is not to hand a child over from the teachings of God into the worship of Molekh. By handing over the offspring of the holy nation to Molekh, you thereby desecrate the Name of your God, Who has called you into His service.
[ https://www.sefaria.org/Leviticus.18.21?with=Ibn%20Ezra&lang=bi&aliyot=0 ]