Add custom payment widget to a node?
1.) What is happening

Twig sanitizes all variables before displaying them. Because it assumes, that the style attribute is from user input and is considered to be unsafe. You can pass most html as #markup, but not the style attribute.

2.) You asked about the most correct way to do this is.

This would be to put all html markup in templates.

3.) How to get around this

If you don't want to build a custom twig template for this, you can use an inline template instead:

$variables['book_now_widget'] = [
        '#type' =&gt; 'inline_template',
        '#template' =&gt; '&lt;div style="font-weight: bold"&gt;{{ var1 }}&lt;/div&gt;',
        '#context' =&gt; [
          'var1' =&gt; 'bla bla bla'],
];