The answer, of course, is to cite the relevant papers and only those.
This is not very actionable advice. Rather, here is what I would suggest. My discipline is mathematics, for context.
- If you use, expand, contradict, give a new perspective to, etc, a previous result, then you should cite it.
- You can usually decide how much space and writing to devote to historical overview and establishing context for the paper. Cite relevant literature; everything if there is only little, or representative sample if there is much. Cover different perspectives at least briefly.
- At this point, ask yourself: Given the references here, is there something that is missing, or something that seems to be excessive? These questions should weed out excessive self-citations or add citations to other relevant literature.
If you afraid that some citation is not relevant, then consider writing at least a sentence to describe it in the context of your present paper, rather than writing for example
similar questions have also been considered in [1, 2, 3, 4, ..., 13].
A few sentences of context will also serve your readers, who might find your paper when looking for something related. The sentence can guide them towards more relevant papers and away from less relevant ones.