In some games, yes, you can filter or block profanity through an in-game menu, usually under audio, chat, or accessibility settings. Many titles include a profanity filter or a chat-censoring toggle for exactly this reason. If a game does not offer such an option, though, you are largely out of luck within that title. It is worth checking the settings menu first, since more games than you might expect include some form of content or chat filtering.