const containerSelector = '.card';
const selectSelector = `${containerSelector} select`;
const dataAttr = 'name';
$(selectSelector).change(function() {
$(this)
.closest(containerSelector)
.find(`[data-${dataAttr}]`)
.hide()
.filter(`[data-${dataAttr}="${this.value}"]`)
.show();
}).val(defaultValueSelected).trigger('change');
// или
const selects = document.querySelectorAll(selectSelector);
const onChange = ({ target: t }) => t
.closest(containerSelector)
.querySelectorAll(`[data-${dataAttr}]`)
.forEach(n => n.style.display = t.value === n.dataset[dataAttr] ? 'block' : 'none');
selects.forEach(n => {
n.value = defaultValueSelected;
n.addEventListener('change', onChange);
n.dispatchEvent(new Event('change'));
});