<div class=" tab-content" data-tab_content="3"></div>
<div class=" tab-content" data-tab_content="1"></div>
<div class=" tab-content" data-tab_content="2"></div>
<div class=" tab-content" data-tab_content="4"></div>
const nodes = document.querySelectorAll('.tab-content')
let sortedNodes = Array.from(nodes).sort((el1, el2) => el1.dataset.tab_content - el2.dataset.tab_content)
const container = document.querySelector('.container')
sortedNodes.forEach((el) => {
container.insertAdjacentElement('beforeend', el)
})