I can think of two "no" and one "yes" scenarios. There may be more.
Someone asks "what is 1 + 1?" and you remember answering that before, so you answer, "as I detail in this other answer {link}, it is 2." Wrong. You should flag or vote to close the question as a duplicate of the one you answered.
Someone asks a question that is not a duplicate of one you answered, but is related somehow. If you can answer the new question, do so, and if you like, include a reference like "My answer to {question} may also be relevant." If you can't answer the question, leave a comment like "Related: {link to question}. This is a correct reference to your other answers.
Someone asks a question about a topic in which you are an expert, and you find yourself needing to state or prove that you an expert. Stop right there. You never need to do that. Really. Never. Linking to some other answers of yours, even highly upvoted ones, is not appropriate in this circumstance. If there are people who need that information they can get it from your profile. Your old answers don't prove you're an expert anyway, any more than the answer you're writing when you consider referring to them does.
Promoting yourself within the site, including linking to answers and questions you think are related, is generally not considered spam and not disapproved of. Promoting yourself in your profile, including links to external websites, things you're selling, and so on, are also not considered spam. Linking to external references from a question, answer, or comment, requires the link to be relevant, and for the material you're providing to have value without the link.
Above all your motivation for asking, answering, or commenting shouldn't simply be to have a place to put the link. If you truly want to know, or truly want to answer and help someone, you'll be fine. Make that your first consideration and use links when they serve that purpose, rather than your own motivations of gaining rep or money, and the decisions and distinctions become easy.