I have seen posts asking similar questions to this, wherein someone applied for a job but was rejected straight away. My issue is slightly more different - in 2018 I applied for a position with a company.
Met with the head of that department, had a face-to-face interview, but they later decided to go ahead with someone else that they had worked with previously. The recruiter I had been dealing with gave me very positive feedback from the interview itself but just said the other person was a better fit right then.
I'm in the process of job hunting once more and have noticed a brilliant job popping up with this same company - this time I'll be contacting the same department manager directly.
Should I apply for the job? The answer is probably yes. It wasn't because I was bad or underqualified, but just because they had a better working relationship with someone else.
If so, should I make reference to the fact they interviewed me before? The company has experienced a lot of growth in this time & the manager likely won't remember me as it was just under 2 years ago now.
Edit: just to clarify, it's in the same department, but a totally different role. The same company and hiring manager. So it isn't like re-applying for the same job.