I am trying to have a vertical tab with hidden content
You might be better using entry.slug instead of entry.title as there could be spaces in the title.
Or add a filter to the title - e.g. entry.title|kebab  which would remove any spaces.
Also this line:
{% if siteMainUrl.text  == href %} active {% else %} hide {% endif %}

Where is href coming from? Is it to have a different active tab to the initial one?
Typically I use:
{% for item in tabdata %}
   &lt;div class=&quot;tab-pane fade {{ loop.index == 1 ? 'show active' }}&quot; id=&quot;{{ item.title|kebab }}&quot; role=&quot;tabpanel&quot; aria-labelledby=&quot;v-pills-{{ item.title|kebab }}-tab&quot;&gt;

  &lt;/div&gt;
{% endfor %}

Which leaves the first tab active.