Get "key" from entity type
Issue:
When working with entities dynamically, the base field name of a specific entity key (e.g., the primary ID field) is not always known beforehand. Given only the entity type ID, the entity key needs to be determined dynamically.
Solution:
Load all base field definitions of the given entity type via entityTypeManager() and return the ID with the method getKey().