Trying to dynamically add a <script> from a custom field

Hi!
I’m trying to display dynamically a script (which is added in a custom field of my CPT)
I tried several way but can’t make it work. When I add it dynamically in a basic text block, it doesn’t work whereas it works if I paste the code in this basic text block.

Any idea?
Thank you!!

Did you try to use Brikcs code block ?

Yes, in the dynamic field but it doesn’t work either

well I would have used another method. Save the code snippets in function.php or in a snippet manager like wpcodebox. Then call the function with the directive {echo: function ()}

Those code snippets are for real estate agent’s estimation module. Each of them have a different snippet/their own. Hence why I added it as a custom field to the agent custom post and need it to be populated for each of their page

put the code into rich text

Did you find a Solutoin?