Murder wasn't a sin at the time of Cain?
Gen 4:7 If you do well, will you not be accepted? And if you do not do well, sin lies at the door. And its desire is for you, but you should rule over it."
Gen 4:8 Now Cain talked with Abel his brother; and it came to pass, when they were in the field, that Cain rose up against Abel his brother and killed him.
The Ten Commandments were not around at the time of Abraham?
Gen 26:5 because Abraham obeyed My voice and kept My charge, My commandments, My statutes, and My laws."
Word for Laws here is TORAH.
Gen 20:3 But God came to Abimelech in a dream by night, and said to him, "Indeed you are a dead man because of the woman whom you have taken, for she is a man's wife."
Gen 20:4 But Abimelech had not come near her; and he said, "Lord, will You slay a righteous nation also?
Gen 20:5 Did he not say to me, 'She is my sister'? And she, even she herself said, 'He is my brother.' In the integrity of my heart and innocence of my hands I have done this."
Gen 20:6 And God said to him in a dream, "Yes, I know that you did this in the integrity of your heart. For I also withheld you from sinning against Me; therefore I did not let you touch her.
Gen 20:9 And Abimelech called Abraham and said to him, "What have you done to us? How have I offended you, that you have brought on me and on my kingdom a great sin? You have done deeds to me that ought not to be done."
Even the Gentile king Abimelech knew something you don't seem to comprehend. The Law against adultery was in full force prior to Mt. Sinai
The Sabbath as well as the other nine Commandments were in force prior to Mt. Sinai...
Exo 16:28 And the LORD said to Moses, "How long do you refuse to keep My commandments and My laws?
Using the Sabbath and the Feast Days as examples...
Isa 56:1 Thus says the LORD: "Keep justice, and do righteousness, For My salvation is about to come, And My righteousness to be revealed.
Isa 56:2 Blessed is the man who does this, And the son of man who lays hold on it; Who keeps from defiling the Sabbath, And keeps his hand from doing any evil."
Isa 56:3 Do not let the son of the foreigner Who has joined himself to the LORD Speak, saying, "The LORD has utterly separated me from His people"; Nor let the eunuch say, "Here I am, a dry tree."
Isa 56:4 For thus says the LORD: "To the eunuchs who keep My Sabbaths, And choose what pleases Me, And hold fast My covenant,
Isa 56:5 Even to them I will give in My house And within My walls a place and a name Better than that of sons and daughters; I will give them an everlasting name That shall not be cut off.
Isa 56:6 "Also the sons of the foreigner Who join themselves to the LORD, to serve Him, And to love the name of the LORD, to be His servants— Everyone who keeps from defiling the Sabbath, And holds fast My covenant—
Isa 56:7 Even them I will bring to My holy mountain, And make them joyful in My house of prayer. Their burnt offerings and their sacrifices Will be accepted on My altar; For My house shall be called a house of prayer for all nations."
Here we see non-Israelites (read Gentiles here) keeping the Sabbath, the fourth Commandment.
Isa 66:22 "For as the new heavens and the new earth Which I will make shall remain before Me," says the LORD, "So shall your descendants and your name remain.
Isa 66:23 And it shall come to pass That from one New Moon to another, And from one Sabbath to another, All flesh shall come to worship before Me," says the LORD.
In the New Heavens and New Earth ALL FLESH will keep the Sabbath, the fourth Commandment.
At the return of Christ, ALL nations will keep the Feast of Tabernacles...
Zec 14:16 And it shall come to pass that everyone who is left of all the nations which came against Jerusalem shall go up from year to year to worship the King, the LORD of hosts, and to keep the Feast of Tabernacles.
Zec 14:17 And it shall be that whichever of the families of the earth do not come up to Jerusalem to worship the King, the LORD of hosts, on them there will be no rain.
Zec 14:18 If the family of Egypt will not come up and enter in, they shall have no rain; they shall receive the plague with which the LORD strikes the nations who do not come up to keep the Feast of Tabernacles.
Zec 14:19 This shall be the punishment of Egypt and the punishment of all the nations that do not come up to keep the Feast of Tabernacles.
Whomever told you that the Commandments were only given to Israel, lied to you.