render form item of type text_format in twig file
It's unsafe to use the raw filter, better use the render element 


  raw
  
  This filter should be avoided whenever possible, particularly if you're outputting data that could be user-entered. See this page
  for more information on auto-escape in Drupal 8.


processed_text:

return [
  '#theme' =&gt; 'mytwig',
  '#thankyou' =&gt; [
    '#type' =&gt; 'processed_text',
    '#text' =&gt; $thankyou_paid,
    '#format' =&gt; 'full_html',
  ],
];


To configure the text format visit /admin/config/content/formats and read the warnings


  Improper text format configuration is a security risk.


In this case it might be better to use Restricted HTML or Basic HTML.