Not OP. I faced a similar problem once.
I found a friend that owned the same model of phone as mine. I used his phone to approximately eye-measure where on the screen I have to press after entering the Settings app.
Now I repeated these presses on my phone. Luckily, although my phone was broken and the screen had become almost fully black, the touches registered.
----------- edit:- If you find it difficult to find a friend that owns your unique phone, your local mobile shop might have a demo phone for you to try out.
Or Youtube search for a video titled "How to enable debugging permissions on Samsung S8?"