There is no “dialog box” option of which I’m aware, so what you’re describing likely isn’t possible. What you could do is have an input number helper above your button where you set the time there and then click the button. In the automation you’d use the value of the input number helper as the time to wait before turning the light off again.
You could create a script to activate the switch and have the time to run or switch off etc, by using the script fields and parsing that to the script as when you run a script from the dashboard that has fields it will pop up with a bix for you to fill in the time (in this case) before pressing run.
I am on my phone so won’t attempt to write examples but there is documentation and you tube videos available. I believe it was also detailed in the 2024.4 release.
Instead of asking for a time after you hit a button, why not fill in an input number first and then hit a button to start a timer with the set number of minutes, e.g.
Here is how I set my grill timer - it also includes a spoken message that is played when the timer has run out: