Jer. 2:27 Saying to a tree, “You are my father,’
And to a stone, “You gave birth to me.’
For they have turned their back to Me, and not their face.
But in the time of their trouble
They will say, ‘Arise and save us.’
Jer. 2:28 But where are your gods that you have made for yourselves?
Let them arise,
If they can save you in the time of your trouble;
For according to the number of your cities
Are your gods, O Judah.
Idols were most commonly carved from wood and stone, as most folks didn't have enough money to make them from gold and silver. The context is clearly about idolatry, so the wood and stone most naturally refer to idols. The same Hebrew word "wood" is used of idolatry in Jer 10:3-8, and both the word for "stone" and "wood" are used in 3:9:
Because she took her whoredom lightly, she polluted the land, committing adultery with stone and tree.
In the context of 3:9, Jeremiah is using "adultery" as a dysphemism for idolatry.
CONCLUSION: "wood" and "stone" refer to idols made of these materials.