I think there are basically two approaches to declining a bid: straight up declining it or giving them “an offer they’ll refuse”.
I don’t work directly with clients anymore, but I’ve worked at agencies that have taken both approaches. I preferred being short and clear, something like “Unfortunately we can’t do X because of Y and Z, but our friends at Company B might be able to help!”. If you’re not clear or too wordy, they’ll just keep coming back with questions or try to negotiate with you.
The alternative is to make “an offer they’ll refuse”. You can overcharge or offer a ridiculous time frame hoping that they won’t take the bid. The fundamental problem with this is that now you’re doing something that you don’t want to do. However this strategy is beneficial in cases where the reason you couldn’t take the gig was technical - maybe the project is harder than you’re comfortable with or you know that there will be a lot of back and forth.
The one thing I would do in either case is refer the client to someone who can do the work.