How best to manage villagers?

I have played some of AoEII but most of my time by far has been in AoEIII. In the few matches I’ve played of AoEIV I struggle to manage all my villagers. I feel like I am constantly reassigning gold and stone collectors to new veins, especially in the later ages when I have the most villagers and they mine through them really fast. I am used to getting to a point where I can set most villagers on an infinite source and forget about them. Any tips on how to manage them? Also how best to distribute them between resources? I know that is very dependant on civ, current age, and other factors, but with the stone that I’m not used to and differences from III, it is throwing me for a loop on what resources are generally important and when.

Thanks for any advice!