Get data attribute from element and add class

This jquery code works and it is in use, but somehow my items filter not working with it correctly. But somehow my vanilla js working with that filter I use.

So my question is:

How I can change this jquery code to vanilla js?

$(".cat-name .cat-link").click(function () {

    let catID = $(this).data("id"),
        $allItem = $('.category')

    let $currentItem = $('.cat[data-category=' + catID + ']');
   
    $('.cat[data-category=' + catID + ']').addClass('active');
        $allItem.not($currentItem).removeClass('active');
    
    $('.all-items').removeClass('active'); // Remove active class from "All Items" tab
   
   });

Thanks if you have time to help me!