Job 38:4-7
Where were you when I laid the foundations of the earth? Tell Me, if you have understanding. Who determined its measurements? Surely you know! Or who stretched the line upon it? To what were its foundations fastened? Or who laid its cornerstone, when the morning stars sang together, and all the sons of God shouted for joy?
Morning star here is a metaphor for angels of God. Also, the term “son of God” in the bible, is used for spiritual beings charged with the responsibility of representing God. This scripture in Job 30:34, provides a background to the statement of God in Gen 1:26.
Genesis 1:26
Then God said, “Let Us make man in Our image, according to Our likeness
This was not God speaking to the Godhead because the members of the Godhead are omniscient and won't be needing an instruction, but angels would. You must know that God always wanted to operate in a family, and so before he put man in charge of the physical creation, he put angels in charge of the spiritual creation, and it's in that sense they are called “sons of God”.
It is important to note that the same way man has free will, angels do as well, and hence some of them rebelled against God. These are the spiritual entities that Paul referred to as “principalities and powers in his letters who fight against God's people (Ephesians 6:12). An example we see in the bible is the prince of Persia in Daniel 10:13.
However, there is a divine verdict over these rebellious spiritual beings
Psalm 82:6-7
I said, “You are gods, and all of you are children of the Most High. But you shall die like men, and fall like one of the princes.”
These rebellious spirits are subject to the name of Jesus. The bible lets us know that he has given him a name that is above every other name (Phil 2:9-11). They are under Jesus’ feet, and therefore under our feet. Take authority today! Take authority over your nation and stand your ground!