Isn’t that story about Samuel appearing as a ghost to Saul wild? The Bible is the most interesting book ever written. It never ceases to fascinate, surprise and challenge me.
Why does Saul contact Samuel for godly advice when he knows God is clearly ignoring him? Sin has that impact on us, doesn’t it? When you know you’ve disobeyed God, but you are still tethered to him and want his help when you’re in trouble. So maybe you reach out to your godly friend and ask them. Maybe you turn to an appealing church, full of resources. You want someone to tell you what you want to hear and rescue you from the mess you’ve made. This is not gospel-behavior, it’s religious behavior.
If there is unrepented sin keeping you from hearing the voice of God, reconcile with him! No amount of second-hand pep talks are going to help you. You need to humble yourself and come to God and confess your sin to him. Ask for his forgiveness, which he gives freely and abundantly.