How do I make a button that, when clicked, displays data in node.js?

So I’ve created a button, along with a table that shows data from my database. However, I want that data to appear only when the button is clicked.enter image description here

`<button id="breakfast2">Breakfast</button>
 <table id="mealTableContainer2">
            <thead>
                <tr>
                    <th id="mealname">Meal Name</th>
                    <th id="mealcalories">Calories</th>
                    <th id="mealtype">Type of Meal</th>
                    
                </tr>
            </thead>

            <tbody id="mealContainer2"></tbody>
  </table>`

The only Javascript I currently have is for getting my database into that table, but I really only want it to appear when I click the breakfast button. I just can’t figure out how; if someone could explain it to me very simply, I’d be appreciate it a ton!