So the article you link has a number of things that make it Shopify-specific, such as the need to include a <script> with window.builderWcLoadCallbacks, and the toggle to render the section model client-side only.
Since I don’t believe your page is using Shopify, you won’t actually need to do any of that. In order for targeting to work for non-Shopify customers, you need to pass the targeting values to Builder within your code base. You probably could find a way to access the query param and pass it to and your builder.get() call, but that might be difficult since I believe you are also using SSR.
Because of all of that, I actually think a much more straight forward approach is to conditionally render the based on if the query param is present/true. So for example, if I had an app matching this starter: Next JS Simple Starter
You could change the Page element to something like: