Thanks for the update and glad that we're making progress.
Here are some important points to note:
1. The "Code" block outputs the content/text as it is, without any processing, so it is not a good fit for showing the content that includes the shortcodes.
2. The "Fields and Text" block is a good fit, but it is important to switch to the "HTML" tab, before adding the content, because the "Visual" tab will also show the content as it is and will even add extra formatting tags.
( screenshot: hidden link )
3. Here are details to better understand the usage of those shortcodes:
These are the examples of the custom shortcode to get the ID of the current post's location, brand, and model term ID:
Location ID:
[get_terms_by_level level='location' return='id']
Brand ID:
[get_terms_by_level level='brand' return='id']
Model ID:
[get_terms_by_level level='model' return='id']
And here is a simple example of how the Types Fields API shortcode works to get the data from the taxonomy term's field:
( ref: https://toolset.com/documentation/customizing-sites-using-php/functions/ )
Where the slug "slug-of-field" field is the slug of our target term field and "123" is the ID of the target term from which we need to get the field data:
[types termmeta="slug-of-field" term_id="123"][/types]
And since we have registered the custom shortcode 'get_terms_by_level' to get our target taxonomy term's ID, we'll use that to pass the target term ID in that "types" shortcode's "term_id" attribute.
Combining the two shortcodes it becomes:
[types termmeta="townname" term_id="[get_terms_by_level level='location' return='id']"][/types]
4. And because we need to use our custom shortcode 'get_terms_by_level' as the attribute value of another shortcode (types), it is important that the system recognizes this custom shortcode.
Which is why it needs to be added in the "Third-party shortcode arguments" section, at WP Admin -> Toolset -> Settings -> Front-end Content.
( I've added it now - screenshot: hidden link )
You can see that the example shortcodes are working on the service post pages now.
5. The third code snippet that you added looks good and I've added small adjustments to it.