Recommend someone else for the opportunity when they’re the better fit. People remember that for years.
LEADERSHIP
LEADERSHIP
Passing an opportunity to whoever fits it better is unusual enough that people remember it for years. It signals two things at once, that you can judge ability and that you are not purely self-interested, and both make you somebody worth routing things through later. Given how rare it is, the cost is lower than it feels. You lose one thing and gain a reputation.
So when somebody asks and you know who the better answer is, say the name. Tell both sides plainly. It tends to come back in forms you cannot predict, which is not the reason to do it.
When did you last point an opportunity toward a better candidate?
Free, with nothing to buy inside it.