Young Samuel serves in the tabernacle/temple in Shiloh, where Eli is high priest. Eli's sons desecrate the sacrificial service, but Eli does not take action against it. Then 'a man of God' comes to condemn Eli for dishonoring God. 1 Samuel 2 verse 27 to 36.
That is striking, because 'the word of the LORD was scarce in those days'. 1 Samuel 3 verse 1. Eli is told: 'I will honor those who honor Me, but those who despise Me will themselves be despised'.
In the time that follows, Samuel receives a verbal revelation from God for the first time. He lies on his bed in one of the rooms built around the sanctuary. Then the LORD calls Samuel. Samuel 'did not yet know the LORD', that is, he was not yet familiar with God's direct speaking. He thinks Eli is calling him from where he sleeps. This repeats three times. Then Eli realizes that it is the LORD who is calling Samuel, and instructs Samuel how to respond when God calls again.
God's message to Samuel is that judgment will be carried out on the house of Eli.
Samuel is afraid to deliver this message to Eli, yet he does so in obedience the next morning.
After this first time, the LORD reveals Himself several times to Samuel in Shiloh, and it becomes clear to Israel that Samuel has been appointed as God's prophet. The word of the LORD comes to Israel through Samuel.
With the appearance of Samuel, the prophetic office comes to the fore, not to disappear until after the Babylonian captivity.