Yes and no. Commandments of God are for everybody.
But not every single commandment of God applies to YOU specifically, necessarily. For example, the commandments given to wives dont apply to husbands and vice versa. Children are given different commandments as well, to obey and respect their parents.
In the old covenant some laws were given only to the levites, not for the rest of Israel. There are also certain commandments given to rich people which if you aren't wealthy would not apply to you.
There are some commandments in the Bible that are situational, for example Noah is told to build an Ark, but that does not apply to us obviously since there will never be another flood like that, as God promised.
++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
If we interpret what is literally written in the bible yes, the commandments of God are intended to different groups & sectors of the society. But that is only what Man's could understand in the words of God, the literal word.
How about we ask the Lord Jesus if the commandments of God are just for different groups or sectors.
This is the answer of Jesus in our question.
As we know, one of the 10 commandments is;
You shall not commit adultery.
By taking the word Adultery literally the command is intended to wives only.
Adultery – means “the carnal relation between a married woman and a man who is not her husband, the latter knowing her to be married.”
For husband's cheating is called concubinage and not adultery.
Therefore in man's understanding all men are exempted in the commandment of You Shall Not Commit Adultery
That is why the Jews applied the commandment literally when they caught Mary Magdalene.
JOHN 8:3-5
3 The teachers of the law and the Pharisees brought in a woman
caught in adultery. They made her stand before the group
4 and said to Jesus, “Teacher, this woman was caught in the act of adultery.
5 In the Law Moses commanded us to stone such women. Now what do you say?”
So it is very clear to the Jews that they are obeying God's law.
But when the Lord Jesus Christ speaks to the Jews, all of them, male & female are committing adultery.
The Lord Jesus said this not just once. Here are few verses when the Lord said this.
MATTHEW 16:4
4 A wicked and
adulterous generation seeketh after a sign; and there shall no sign be given unto it, but the sign of the prophet Jonas. And he left them, and departed.
MATTHEW 12:39
39 But he answered and said unto them, An evil and
adulterous generation seeketh after a sign; and there shall no sign be given to it, but the sign of the prophet Jonas:
MARK 8:38
38 Whosoever therefore shall be ashamed of me and of my words in this
adulterous and sinful generation; of him also shall the Son of man be ashamed, when he cometh in the glory of his Father with the holy angels.
Since the commandments of God are spiritual it very clear that the commandments of God are for husband & wife, male & female.
ROMANS 7:14
14 For we know that
the law is spiritual: but I am carnal, sold under sin.