How to display a block on only the listed pages using wildcard and excluding subpages?
Method 1. PHP filter

I think your question is partially answered here:

How to add page restrictions for blocks in drupal?

Only you might use this code:

&lt;?php
$arg = explode('/', drupal_get_path_alias());
if ($arg[0] == 'about-us' &amp;&amp; $arg[1] &amp;&amp; $arg[2] == NULL) {
  return TRUE;
}
else {
  return FALSE;
}
?&gt;


Method 2: Context module

Alternatively, you can try the Context module, which offers more robust visibility options. For instance, in addition to including paths you can prefix a path with a tilde "~" to exclude it.

I think this should do it:

about-us/*
~about-us/*/*


Edit: Added second method.

Edit: Using $_GET['q'] in method 1 instead of arg() (Thx, @leymannx!)