<my-ce>
  <span>Hello, Slots!</span>
</my-ce>

<script>
  class MyCe extends HTMLElement {
    constructor() {
      super()
      const shadow = this.attachShadow({ mode: 'open' })
      shadow.innerHTML = '<slot></slot>'
    }
  }
  customElements.define('my-ce', MyCe)
</script>

Add a default slot to the template

Add a slot element to the shadow DOM to define where the content of the custom element will be placed.