A wooden spoon will not ALWAYS prevent the water from boiling over. It's just that in two (fairly narrow) identical situations, the wooden spoon may delay the boiling over longer than the metal spoon.
You will recall that if you stir a pot and leave in the spoon, the metal spoon becomes hot (it conducts heat) while the wooden spoon stays cooler (wood is not a good conductor, its more of an insulator ).
You'll also recall that when water boils with something like rice in it, you can see the rice move in circles. It is following the convection current created as the cooling water moves to the bottom as the hotter water rises in the pot. (That's a density thing.)
Now combine the two ideas. The spoons are both setting atop their respective pots. Long before the boiling begins the metal spoon is getting hotter than the wooden spoon. It is touching the pot and absorbing more heat since its metal. When the hot water bubbling up meets the hot metal spoon. It's going to stay hotter at this small surface area. In contrast, the hot water meeting the wooden spoon meets a cooler surface and the water will cool a bit as it attempts to transfer heat to the wooden spoon.
The water meeting the wooden spoon loses MORE heat than the water meeting the metal spoon. So as the pots boil, the one topped with the wooden spoon slows the boiling at the very top of the pot more than the metal spoon will.
This situation will not last forever since eventually the entire pot of water will become hotter and hotter and will overcome this small difference in heat transfer.
Read more: A Wooden spoon layed across a pot of water will - JustAnswer