You can take the element in a temporary variable so that you can append that after the time ends:
var temp = document.getElementById('div-02');
var el = document.getElementById('div-02');
el.remove(); // Removes the div with the 'div-02' id
setTimeout(() => {
document.body.append(temp);
},5000)
<div id="div-02">Here is div-02</div>
But the ideal solution would be hide/show using the style property of the element:
var el = document.getElementById('div-02');
el.style.display = 'none';
setTimeout(() => {
el.style.display = 'block';
},5000)
<div id="div-02">Here is div-02</div>
display: none