Hey Favourit, How are you, man? It's a great question. I can think of two ways(but I haven't found any other direct way yet!)
If the routes are specific, then they may not be dynamic. Specific routes can be static and deal with them as the static routes.
The problem with the first approach is, what if the route segments are way big in number? And What if you do not know about the segments beforehand? In this case, control it at the segment generation level, not the route level. Routing goes by pattern. If the pattern is the same, and for that, you want to opt out of a few segments, take them out in our logic where you generate the segment... Let's say, your dynamic route pattern is /blog/${slug}, in this you want to take /blog/what-a-good-day and /blog/i-am-great but I want to ignore /blog/not-so-great, ignore it USE NEXT.JS MIDDLEWARE. With that you can include named parameters: /about/:path matches /about/a and /about/b but not /about/a/c
You can read about them from the middleware doc, and I will also teach these concepts in my nextjs playlist on YouTube :)