Do I have to have defeated Plantera in that world? Because when I try and use the Lihzahrd Altar that's supposed to summon the Golem, it doesn’t work and I can’t activate the Golem!
According to the official Terraria wiki:
Golem is a Hardmode, post-Plantera boss found in the Jungle Temple. It can only be fought after Plantera has been defeated in the current world.
So, yes, you need to defeat Plantera first.
You'll also need a Lihzard Power Cell, if you don't have one already:
Golem is summoned by using the ⚷ Open / Activate key on the Lihzahrd Altar, located in the final Jungle Temple chamber, while at least one Lihzahrd Power Cell is in the player's inventory.
Just remember that the Power Cell must be in your inventory while you use the Altar.