Threatening to quit over another job offer can backfire, especially if it catches your manager by surprise.
Frequent complaining may lead your manager to welcome your departure as an end to ongoing dissatisfaction.
If your actions suggest you've already decided to leave, your threat may not be taken seriously or seen as a last-ditch effort.
Instead of threats, consider open negotiation, clearly defining your value, and having professional discussions with your manager to address job concerns.