If you’re concerned one of your heirs may contest your will, you can include something called a no contest clause.
While it is called a no contest clause, it doesn’t explicitly forbid contest. The way it works is if a beneficiary contests your will and loses, they forfeit any inheritance you left them. That requires that you leave them something.
Again, a no contest clause doesn’t forbid contest but it can strongly discourage it.