$heroPost is (hopefully) a page object, not a field object (but excerpt is a field method)
You don’t call a method with its signature, but with values for the parameters
Your code line is missing an echo statement
Correct:
<?= $page->text()->excerpt(); ?>
This will use the method with its default values. If you want to change any of the parameters, e.g. the excerpt length, i.e. without the type hint and the name of the parameter: