For twenty years after Eli and his sons died, the Ark of the covenant was firstly in Philistine hands and then in a house in a village in Israel. The people felt like God had abandoned them, and so they came to Samuel for help:
1 Samuel 7:3-4 Then Samuel said to all the people of Israel, ‘If you want to return to the Lord with all your hearts, get rid of your foreign gods and your images of Ashtoreth. Turn your hearts to the Lord and obey him alone; then he will rescue you from the Philistines.’ So the Israelites got rid of their images of Baal and Ashtoreth and worshiped only the Lord.
Samuel offered a sacrifice, the Philistines tried a sneak attack, but God then turned up, so to speak, and won the day:
1 Samuel 7:13-17 So the Philistines were subdued and didn’t invade Israel again for some time. And throughout Samuel’s lifetime, the Lord’s powerful hand was raised against the Philistines.