How to drill a table top without drilling through it?
There are drill stops that are available that clamp to the drill bit or other stops that mount on the drill as an attachment.
For little jobs like that I have always found that some tape wrapped around the drill bit is sufficient - but don’t be pushing hard.
For precise jobs then a pillar drill gives accurate results.