There isn't an easy, straightforward way to do tooltips yet, even though it's the year of our lord 2025. (though maybe there's a dead-simple library out there that I haven't found yet)
Don't get lost in the weeds, because this section is minutiae rather than a solution. However, here are some small aspects to consider:
The modern no-Javascript way to do this is <details> and <summary>.
Another no-Javascript option is <dialog>.