وَإِن تُصِبْهُمْ حَسَنَةٌ يَقُولُوا۟ هَٰذِهِۦ مِنْ عِندِ ٱللَّهِۖ وَإِن تُصِبْهُمْ سَيِّئَةٌ يَقُولُوا۟ هَٰذِهِۦ مِنْ عِندِكَۚ قُلْ كُلٌّ مِّنْ عِندِ ٱللَّهِۖ According to this verse from surah an nisa everything is from Allah. Then why is it said that good dreams are from Allah n bad ones from satan? Not just for dreams, for other things too its said. Thanks dear brother
Everything is from Allah in the sense that this universe is like a video game maintained by God. Nothing can ever happen inside this game without God making it happen. This universe would be like a lifeless ball of steel, with nothing ever moving or changing, if it wasn’t for God changing it moment by moment and in this way creating what we call “time”.
But God is not the only actor in this game. God and all beings with free will are actors. So while nothing can ever happen unless God makes it happen, the reason something happens can be either God or another agent. So when a murderer shoots someone, it is God who changes the positions of the atoms so that the murder can take place. But the reason the murder happened was the murderer’s choice. So God changed the universe from a state in which the murder had not happened to a state where the murder had happened. But the murder only happened because of the murderer’s choice.
Think of it like playing a video game that’s controlled by a higher power. You can issue commands for your character in the game to do certain things. But none of your commands will have any effect unless that higher power puts your commands into practice. So you can command your character to do something, but it will only happen if that higher power takes your command seriously and allows it to happen.
So Satan can inspire certain thoughts in us, but Satan has no power over the universe. Satan can only wish, and God either allows those wishes to have an effect or not. Satan is the reason for the bad inspirations, but they would never happen unless God actually allows it to happen and changes the universe to a state where it happens.
For more on why things are this way see my essay: Why God Allows Evil to Exist, and Why Bad Things Happen to Good People