That's exactly what I mean.
There are many examples of 'the law', having different meaning in the context.
Here is a verse with two different examples of "the law", applying to different subjects.
Romans 7:25
Thanks be to God through Jesus Christ our Lord! So then, on the one hand I myself with my mind am serving the law of God, but on the other, with my flesh the law of sin.
As far as I am concerned, 'the law of sin', meaning the deeds of the flesh (Galatians 5).
made the case that "the Law of God" refers to "the Law of Moses", though I agree that "the law" is often used to refer to categories of law other than "the Law of God/Moses", such as "works of the law" and "the law of sin". In Acts 5:32, the Spirit has been given to those who obey God, so obedience to God is part of the way to receive the Spirit, however, Galatians 3:1-2 denies that "works of the law" are part of the way to receive the Spirit, therefore that phrase does not refer to obedience to to "the Law of God". In Romans 3:27-31, Paul contrasted a law of works with a law of faith, so "works of the law" are of works while he said that our faith upholds God's law, so it is of faith, and a law that our faith upholds can't be referring to the same thing as the "work of the law" that are not of faith in Galatians 3:10-12.
In Romans 7, Paul said that the Law of God is good and that he wanted to do good, but contrasted that with the law of sin that was working within his members to cause him not to do the good that he wanted to do. In Romans 7:7, Paul said that "the Law of God" is not sinful, but how we know what sin is, and when our sin is revealed, then that leads us to repent and causes sin to decrease, however, in Romans 7:5, the law of sin stirs up sinful passions in order to bear fruit unto death, so it is sinful and causes sin to increase. So verses that refer to a law that is sinful, that causes sin to increase, or that hinders us from obeying "the Law of God" should be interpreted as referring to the law of sin, such as Romans 5:20, Romans 6:14, Galatians 2:19, Galatians 5:16-18, and 1 Corinthians 15:56. Furthermore, Paul said in Romans 7:22 that he delighted in obeying "the Law of God", so verses that are interpreted as referring to "the Law of God" should make sense for it to be referring to something that Paul delighted in doing, such as it would be absurd to interpret Romans 7:5 as referring to "the Law of God" as if Paul delighted in stirring up sinful passions in order to bear fruit unto death.
I was not born under the law, therefore, 'the law of God' will always be the commandments below.
1 John 3:23-24
This is His commandment, that we believe in the name of His Son Jesus Christ, and love one another, just as He commanded us. The one who keeps His commandments remains in Him, and He in him. We know by this that He remains in us, by the Spirit whom He has given us.
In Romans 6:14, Paul described the law that we are not under as being a law where sin had dominion over us, which does not describe "the Law of God", which is a law where holiness, righteousness, and goodness have dominion over us (Romans 7:12), but rather it is the law of sin where sin had dominion over us. Furthermore, in Romans 6:15, being under grace does not mean that we are permitted to sin, and sin is the transgression of "the Law of God" (1 John 3:4), so we are still under it. God is sovereign, so we are all under His law and are obligated to refrain from sin.
Everything that God commanded in the Law of Moses is an example of how to correctly love God and our neighbor, which is why Jesus said in Matthew 22:36-40 that those are the greatest two commandments and that all of the other commandments hang on them, so if you think that we should obey the greatest two commandments, then you should also think that we should obey the commandments that hang on them. For example, if we love God and our neighbor, then we won't commit adultery, theft, murder, idolatry, rape, kidnapping, favoritism, and so forth for the rest of the Law of Moses.