How can I install a kill counter on my Minecraft Java Edition Realm?

To
2

How can I install a kill counter on my Minecraft Java Edition Realm?

Be

Where do you want it to appear?

Cr

/ scoreboard objectives add Kills totalKillCount

/ scoreboard objective setdisplay sidebar kills

The first command creates the scoreboard for this and the second ensures that the score is displayed on the side. You can also replace the sidebar with list or belowName to display the value in the player list or above the player