God sees, God knows, and God judges. Ahab had sinned and God saw it. As a result, God tells Elijah to go and confront Ahab and let him know that God will judge. Read 1 Kings 21:19.
You shall speak to him, saying, ‘Thus says the Lord , “Have you murdered and also taken possession?”‘ And you shall speak to him, saying, ‘Thus says the Lord , “In the place where the dogs licked up the blood of Naboth the dogs will lick up your blood, even yours.”‘”
1 Kings 21:19 NASB
All the sin that Ahab and Jezebel had done, God had seen and now God is goong to hold them accountable for it. They stole the field and Naboth was killed, so God is going to have them go through the same thing and die the same way.
God knows what we do and God judges our sin. Some people refer to things like “karma” and such to explain this, but really it is just God following through on what he has said that he will do when sinners don’t repent. Are we repentant for the things that we have done that have wronged God and others? If not, we need to recognize that God is going to get our attention and might even allow the things that we have done to others to be done to is.