When you see or hear about a job you want, apply for it!
Don't make the mistake of holding back thinking that "if they really wanted you they would come and offer it to you". 'They' are usually busy and don't have the time to look for candidates. Managers expect people to be managing their own careers and apply for the roles they want.
Or that "I don't have 3 million percent of what they want so I won't apply" logic. It's not logical. None of the candidates is likely to be perfect. Recruiting managers decide on who is the best fit. Don't take yourself out of the running before the race has even started.
Compare a role with your existing skills, knowledge and experience. If you've had to learn something new in the past and you've done that successfully - is there any reason why you wouldn't be able to do that again?
If you've learnt new things in the past, can you do it again?
Take counsel from your network and mentors, review a role in line with your career plan and if it stacks up - and it's what you want to do - apply!
Have you held yourself back from applying for a job you wanted?