This is not a tutorial, I'm just sharing a project I made with Tasker on my Galaxy :)
Power Menu mini Power menu Tasker project
Did you know that the side key of the Galaxy device have 2 actions? As default, it's only just the power menu. But I dig into the settings database and found that there are multiple values for the key. Now I have set my side key to open device assistant when I long press and if I hold it for more than 7 seconds, It will open the regular power menu just like in some other Galaxy devices.
Since I removed Google assistant when debloating , now I added a custom made power menu for my device to launch as the assistant when long pressed the side key. This is a demo of it :)