First I was asked politely to not swear, even if I was not a customer facing employee.
Second time I was cautioned was because I’d switched to swearing in another language. Manager thought it was hilarious, but they still knew I was swearing.
I spent the next five years being increasingly creative with how I swore. A temporary (and loud) revert to English swearing when I was in a workplace accident was kindly ignored due to circumstance.
There was no third warning.
I’ve always added a carrot.