Pass URL to iframe in WordPress Block

I have a WordPress site with an iframe that displays custom content from an external site.

Here is my iframe code:

iframe src=https://www.targetsite.com/UNIQUECODE width=800 height=800

I want the UNIQUECODE in the iframe to populate based on the browser URL (my site is example.com):

http://www.example.com/iframepage?UNIQUECODE

Is this possible with the WordPress block editor and/or with an update to functions.php?

Topic block-editor iframe functions Wordpress

Category Web

About

Geeks Mental is a community that publishes articles and tutorials about Web, Android, Data Science, new techniques and Linux security.