Best Practice: Remove UUID or default_config_hash from Custom Content Type definitions? When I'm exporting the custom content type definitions using the UI, many of the resulting YML files hold a uuid and default_config_hash, like:
uuid: b69d8e54-076c-4a15-a396-19f49369fa68
...
_core:
  default_config_hash: 3aSvUp4PtrivflrkaLdNRL1USkZLsS7NdQroSiRX9mA
...

Now, when I'm using this as a basis for my custom module, is it recommended to remove those lines?
Yes, it is best practice to remove both.
Drupal Console provides these options:
drupal config:export:single \
  --name=config.settings.name \
  --remove-uuid \
  --remove-config-hash

Or export an entire set of YAML files of a content type directly to the modules install folder:
drupal config:export:content:type page \
  --module=&quot;demo&quot; \
  --optional-config \
  --remove-uuid \
  --remove-config-hash

See https://drupalconsole.com/docs/en/commands/config-export-content-type