ref https://bobbyhadz.com/blog/javascript-hide-button-after-click
<div id="box" style="height: 100px;width: 100px;background-color: salmon;display: none;">
Box
</div>
<button id="btn">Click me</button>
<script>
const btn = document.getElementById('btn');
btn.addEventListener('click', () => {
// hide button
btn.style.display = 'none';
// show div
const box = document.getElementById('box');
box.style.display = 'block';
});
</script>