Components: wrapping text in span

Hello,

I’m working with components where some part of the text is highlighted:

In term of CSS, it’s easy enough, I have to style every span nested in my heading class.

Now my issue is when I create a component where the text is a property of the component:

Screenshot 2023-05-10 at 12.25.07

How can I wrap some part of this text in a span?
The more I work with components, the less I understand how to make them versatile.