Profanity in Trek has always been around, but used to make a point. When Kirk says Let’s get the hell out of here at the end of City on the Edge of Forever, it emphasizes the pain straightening out the timeline has caused him. And you generally couldn’t say hell on network tv in the '60’s. Roddenberry and company allegedly butted heads with NBC standards and practices to keep that line intact.
In the movies, it was funny and in character when McCoy called Spock an green blooded SOB. Kirk’s reaction to David’s death in TSFS equally in character. Scotty saying Klingon Bitch in TUC seemed undignified.
TVH gave the impression humanity had left a lot of casual swearing behind.
Data cursing in Generations can be construed as getting a cheap laugh or the character trying to be more human. I’m still amazed TNG got away with Picard uttering merde on tv.
Dropping an F bomb in Trek doesn’t seem to have any good reason behind it.