Most performant way to check if a user is referenced in any node of a specified type?
I suggest you NOT to worry about performance until it's not a real issue. That doesn't mean of course you can write any silly things you want to.
The code snippet you posted is just fine. You are using the Drupal API, which is a good thing to do.

If you really want to speed up things, to make it for example with ONE query (instead of two) you can use:

\Drupal::database()-&gt;select("..."); // With a proper dependency injection


About how to write queries in Drupal connection class there is a lot of good tutorials. If you wouldn't find one, please let me know.

However, I only would use this, if it's a REALY performance issue. It's never a good thing "having a knowledge" in your production code about your table schemes. Always start with EntityTypeManager or entityQuery (as you did).