- the candidate has a range of salary they expect or need
- the company has a range of salaries that they can pay
If these don't overlap there's no point going forward unless the range of the company is higher.
If these do overlap, it's worthwhile proceeding. Then it's a matter of skill. If you apply and ask for the top range in my salary band, and you are truly exceptional, I'll do my best to match it. But the ask needs to be commensurate to the skills you demonstrate in the interviews. The higher the ask, the stricter the criteria to match.
If you get to the end of the process without disclosing the salary, and you pass all interviews, I'll offer you for what I think you are worth. If you have an ask and did not disclose it, you might have just wasted everybody's time.
Believe it or not, negotiating a salary higher than your worth is a terrible idea. It might sound good, but it sets you up for failure.