Kirk wouldn't know how to swear back, even if a little off sometimes, if there was no swearing at all. All the examples I chose in my earlier post were from outside of TVH.
In TVH, Kirk said that "no one pays any attention to you unless you swear every other word" in 1986. He never said there was no swearing at all in the 23rd Century. Spock in TVH is also socially inept and had his mind re-trained and everything was still coming back to him. He wasn't quite himself yet.
There's also the fact that Star Trek has been produced over several decades. What else has changed over the last several decades is the loosening of standards. TOS was made during a time when the Hays Code had only just lost its grip. The TOS Movies were Rated PG. Dropping F-bombs would've pushed it up to R when they were made. It wasn't like today where almost everything is PG-13 and they'll allow the word "fuck" if it's used in a non-sexual context. The movies from FC onwards (except for Insurrection) are all PG-13. Though none of the movies say "fuck". DSC did it once awkwardly. They don't use that word in SNW. But PIC is intended to be more "adult" than DSC or SNW and definitely the movies, and it's within the range of what's now considered "acceptable" for PG-13 (or TV-14), so they're using it here.
Before PIC, DS9 was the most adult Star Trek. If it were allowable back then, DS9 would've used the word "fuck". Ron Moore's BSG used "frak" in lieu of "fuck", so I strongly suspect that if he could've gotten away with it, he would've used "fuck" on BSG and would've used it on DS9.
EDITED TO ADD: Then there's Leah Brahams in TNG itself. The first thing she says to Geordi when she gets off the transporter pad at the beginning of "Galaxy's Child" is, "So you're the one who fouled up my engines!" The way she said it, you know what she really would've said if the censors would've allowed it. Let's not fool ourselves. You know, I know, everyone knows. Don't pretend otherwise.
"So you're the one who fouled up my engines!" is the Honorary First F-Bomb in Star Trek.