To block inappropriate content on Xbox, use the built-in content filters. Microsoft Family Safety, for example, allows you to enable Safe Search on the Bing search engine, filter out inappropriate websites, and/or create a blacklist or whitelist. There’s also an option to filter out apps and games based on age rating or block a specific app or game entirely.
If you’re looking for more granular content filters, consider getting Bark Home. It enhances the built-in protections by allowing you to filter from 15+ content categories of apps and websites, including Social Media, Games, Drugs, Alcohol, and Gambling, and set different rules and restrictions for different times of the day.