How long could a dragon survive if it were trapped in its lair?

Pretty much just what the title says. Would it just starve and die over time, or would it be able to survive in some way?

Some clarifications:
I’m assuming a red dragon, and the lair being something in line with the description in the MM: "Red dragons lair in high mountains or hills … Caves with volcanic or geothermal activity…"

So something in line with this, a cave in some high mountains.

For this case, I am assuming the standard rules (not the spellcasting variant).