You can get demonetized for swearing on YouTube, but it is largely dependent on frequency, severity, and context. For example, if you use some bad language once or twice, you may still be able to keep your video monetized. If the content is a music video containing bad language, due to the context, YouTube may allow the video to keep full monetization. If you are looking to find the words that get you demonetized on youtube, just use the common-sense approach and avoid all profanity on your channel.