Discussions like ours have been going on forever. I have tried to argue from a naturalistic approach:
The following quotes on the late medieval and early modern Jesuit theologian and philosopher Francisco Suárez (1548—1617) are instructive:
"One position is extreme naturalism or intellectualism, which Suárez attributes to Gregory of Rimini and several others (DL 2.6.3). On this view, no legislative act on God’s part is needed. Rather,
natural law simply indicates what should be done or not done on the basis of what is intrinsically good or bad. Loss of life, for example, is bad: murdering King Duncan deprives him of life, and so Macbeth ought not to stab Duncan.
On the extreme naturalism espoused by Gregory, Macbeth’s duty not to murder Duncan would obtain even if God had not given the Ten Commandments and even if God had not existed at all.
On the other side is an extreme voluntarism that says that natural law consists entirely in a command or prohibition coming from God’s will, a view that Suárez attributes to William of Ockham (DL 2.6.4). On this view, what one ought or ought not to do is wholly determined by God’s legislative acts and, furthermore, God’s legislative acts are unconstrained. That is, there is no act that is intrinsically bad such that God is compelled to prohibit it or even prevented from commanding it and no act that is intrinsically good such that God is compelled to command it. Had God commanded us to murder and steal, then doing so would have been obligatory and good.
Characteristically, Suárez charts a middle course. He first agrees with the extreme voluntarists that natural law is genuinely preceptive law, and argues that for a law to be genuine law and not just law in name it must be grounded in the legislative act of a superior (DL 2.6.5-10). The obligatory force of natural law comes from God’s will. Contra Gregory of Rimini, that obligation would not be present had God not legislated or not existed at all.
But then comes the crucial qualification that ends Suárez’s agreement with extreme voluntarism: “Second, I say that this will of God—that is, this prohibition or precept—is not the whole reason for the goodness and badness that is found in observing or transgressing the natural law, but that the natural law presupposes in the acts themselves a certain necessary fineness or wickedness and adjoins to these a special obligation of divine law” (DL 2.6.11). The extreme voluntarist thinks that God is free to command as he wishes, unconstrained by the natures of things. Suárez, on the other hand, thinks that God’s commands and prohibitions are constrained by natural goodness and badness. As befits a perfect being, God prohibits some actions precisely because they are evil. Suárez thinks it absurd to suggest that there are no actions such that they are too evil for God to command or even just to permit. To this extent, then, Suárez agrees with the naturalist; the obligations of natural law are rooted in natural goodness and badness."
https://iep.utm.edu/suarez/#SH3i