Here, this might help:
9 For he spoke, and it came to be; he commanded, and it stood firm.
10 The LORD brings the counsel of the nations to nothing; he frustrates the plans of the peoples.
11 The counsel of the LORD stands forever, the plans of his heart to all generations. - Psalm 33:9-11
So this says that God’s plans don’t fail. So that’s that. And God is holy, He’s righteous, perfect ect. So He cannot sin. So whatever He does, it’s with a righteous intention to produce a good outcome ultimately, and it will indeed happen if God wills it.
Does that make sense, friend?