How do I add fields to an existing custom entity?
You just need to add a field_ui_base_route to the entity annotation. The value should be the route ID for the edit form of the config entity type used to provide the bundles.
So if your entity ID is foo and the bundle config entity ID is foo_type, that would be:
@ContentEntityType(
  id = &quot;foo&quot;,
  ...
  field_ui_base_route = &quot;entity.foo_type.edit_form&quot;
)

Rebuild the cache, and you should see the relevant menu links and tabs when you manage your bundles in the UI.