Можно скрипт к такому виду привести
const platformButtons = document.querySelectorAll(".changer__platform");
const activeTargetClass = "platform__description_active";
platformButtons.forEach(tab => tab.addEventListener("click", () => {
const target = document.querySelector(`#${tab.id}_desc`);
const currentTarget = document.querySelector(`.${activeTargetClass}`);
currentTarget && currentTarget.classList.remove(activeTargetClass);
target && target.classList.add(activeTargetClass);
}));
Или короче для современных браузеров
const platformButtons = document.querySelectorAll(".changer__platform");
const activeTargetClass = "platform__description_active";
platformButtons.forEach(tab => tab.addEventListener("click", () => {
document.querySelector(`.${activeTargetClass}`)?.classList.remove(activeTargetClass);
document.querySelector(`#${tab.id}_desc`)?.classList.add(activeTargetClass);
}));