API example code—where do I actually put it?

I’m new to Capacitor/Node. I have created Capacitor’s demo app, and I can run it in my iOS simulator.

Following the instructions at Capacitor - build cross platform apps with the web, I (believe) I have installed the status-bar plugin. I see in the documentation the example code. I presumed that, for the purposes of learning, I could put this code in a <script> tag at the end of my index.html <body>. While I can still sync/run iOS and the demo app still runs, calling hideStatusBar(); or StatusBar.hide(); seems to have no effect.

I have not yet learned how to debug a Capacitor app once it’s launched on my iOS simulator. Therefore, I am not certain what I have done wrong. While I divert my learning process to debugging, is there a simple answer to using example code that I have missed?