Now Samuel had died, and all Israel had mourned for him and buried him in Ramah, his own city. Saul had expelled the mediums and the wizards from the land (1 Samuel 28:3).
And when Saul enquired of the LORD, the LORD did not answer him, either by dreams or by Urim or by the prophets (1 Samuel 28:6).
Saul asked his servants to find a medium he could consult about the future, seeing that God would not answer him. He wanted to contact Samuel his dead friend.
When the woman saw Samuel, she cried out at the top of her voice and said to Saul, "Why have you deceived me? You are Saul!" The king said to her, "Don't be afraid. What do you see?" The woman said, "I see a spirit coming up out of the ground" (1 Samuel 28:12,13).
Samuel said ”Why have you disturbed me by bringing me back here?” (1 Samuel 28:15).
God told Samuel to yell at Saul for contacting the dead. Samuel lectured him for not trusting God.
Samuel then went on to predict that Saul would die the next day. The Scripture tells us that Saul did indeed die as Samuel predicted. It’s assumed this wouldn’t have happened if he had trusted God.