Create basic field data in template like node for custom entities {{ custom_entity.id }}
Why does {{ custom_entity.id }} produce this error message?

Exception: Object of type Drupal\Core\Field\FieldItemList cannot be
printed.

If your entity defines id for the entity ID then {{ custom_entity.id }} is ambiguous. It can mean the object property (the ID field) or the method EntityInterface::id().
So use parentheses to make it clear it is a method:
{{ custom_entity.id() }}

Or retrieve the field value when you have already a field as the error message shows:
{{ custom_entity.id.value }}


What are they doing special for node?
The node entity is using nid as ID field, so id and nid are unambigious.
Method id():
{{ node.id }}

Field nid:
{{ node.nid.value }}