Screenshots are broken, but anyways...
What you need is a Singleton
You can read more about it but i'll make a short guide for you here:
You will create a new script (Not tied to any nodes, just right click on the file explorer and choose "New Script...", name it "Playersingleton" or something like that.
Then you will click on "Project > Project Settings" go to the "AutoLoad" tab, click on the file icon to add that script (Note: You will have to give it a name and click "add" after selecting it)
This script is now automatically loaded everywhere, in here you can keep variables (and functions too, but lets start simple first).
Now lets go to the practical part:
In this script you will add
var playerenergy = 0
to change this var from an outside script, for example on your player or bullet script, you can reference it like this:
if [bullet hits enemy]:
Playervars.playerenergy += 1
(Playervars would be the name you chose on the autoload adding part)
Let me know if this works for you!