With svelte 5.0, the way of mounting component into js has been changed. Now it looks like that:
import { mount } from "svelte"; mount(Component, {target: targetNode});