Packing taxonomy fields into one div not from SQL?
This is the content of field.html.twig in the core theme classy:

{%
  set classes = [
    'field',
    'field--name-' ~ field_name|clean_class,
    'field--type-' ~ field_type|clean_class,
    'field--label-' ~ label_display,
  ]
%}

{%
  set title_classes = [
    'field__label',
    label_display == 'visually_hidden' ? 'visually-hidden',
  ]
%}

{% if label_hidden %}
  {% if multiple %}
    &lt;div{{ attributes.addClass(classes, 'field__items') }}&gt;
      {% for item in items %}
        &lt;div{{ item.attributes.addClass('field__item') }}&gt;{{ item.content }}&lt;/div&gt;
      {% endfor %}
    &lt;/div&gt;
  {% else %}


Each field is packed into a div with its own class field--name-field-name. In your case field--name-field-tags and field--name-field-categories.

Steps for solution:


If you don't use classy as base theme you can put somehting similar in your custom theme or simply copy this twig from the classy theme and change as needed.

core/themes/classy/templates/field/field.html.twig -> themes/mytheme/templates/
Flush all cache.