I heavily customise my Linux desktop setups, which includes binding scripts to hotkeys. Occasionally a visual feedback is useful (eg. when changing the CPU frequency). I’m aware of the following ways to display some sort of overlays which I tried with Ubuntu 24.04:
Notifications

Notify-send notifications display as simple rectangles.
notify-send "Volume" "80%"
Although there is a time out setting, that doesn’t seem to have any effect, so they require user interaction. On the upside, notifications don’t steal focus from the current input.
Pop-up

Zenity shows a simple pop-up:
zenity --info --text="Volume: 75%" --timeout=2 --title="Volume Indicator"
Timeouts do work, but unfortunately the popup takes a few seconds before it displays and it does steal input focus.
Overlay

osd_cat displays true overlays:
echo "Volume: 80%" | osd_cat -p top -o 20 -c green -d 2 -f "-*-helvetica-bold-r-*-*-48-*-*-*-*-*-*-*"
They don’t steal focus and they also go away after the timeout passes.