Every server on Mastodon and the Fediverse has its own set of rules, written by the people who own and run that particular server
You can see the rules on your server by logging in through a web browser and clicking on "About this server". You can check the rules on other servers by going to their front page and cilcking "Learn more".
If you disagree with your server's rules, you can move your account to a different server with different rules (instructions for moving are at https://mstdn.social/@feditips/107939441820299376). You can even set up a server of your own, where you write the rules yourself (instructions are at https://mstdn.social/@feditips/108120327467587242)
This is one of the biggest differences between Mastodon and Twitter: On Twitter it's entirely Twitter's management that decides what is acceptable. On Mastodon, thousands of separate servers each have their own rulebook. While Twitter governs its users, on Mastodon the users can govern themselves.