Connect Office Scripts to Buttons
Similar to Excel for desktop, mapping Office Scripts to a button on excel online would be incredibly useful.
This feature is under exploration now for a script to be invoked using a shape.
As John mentioned this is not possible to implement "button" in Power Automate. But the script can still be run from a flow.
It might be the case that this won't be possible to implement. This is because Office Scripts events are Power Automate Events. That is, the events are initiated (triggered) by Power Automate. Having buttons and Workbook events, etc, might conflict or create unmanaged situations not only in Excel-online but also in Power Automate (and Power Apps).