I'm trying my hand at DMing and I've come across a silly question that I can't really find an answer to.
For a side quest encounter I want to put a ghoul trapped in a well by a spell barrier, but I heard that the plane we are on matters. Can a ghoul be on the material plane that we all start on?
The Material Plane is the default plane of existence, and the one in which the vast majority of D&D games spend most of their time on. It is essentially the "real world" within the context of the fictional world - by comparison, other planes are like alternate dimensions.
Planes other than the Material Plane are largely optional to creating a D&D campaign, and at the very least, you certainly don't have to worry about them right away. The average NPC resident of the material plane knows little to nothing of these other planes, and spends their entire existence living only in the realm they know and exist on.
Most sword and sorcery stories and movies take place almost entirely on the Material Plane. With that in mind, most things from them are things that can happen there. Things that are not the Material Plane might include spirit worlds (like in Avatar: The Last Airbender), realms of shadow (like in Lord of the Rings), or an afterlife.
Ghouls and physical undead absolutely exist on the Material Plane - they are as physical and real as anything else on Earth.