What is the reason for yellow teeth even though I don’t smoke?

The dentin itself is yellowish in colour, and enamel that is highly mineralised and highly transparent will appear slightly more yellow than normal.
In addition to smoking, if you drink coloured drinks regularly, this can also cause pigmentation.