Taking the lid off a post 1995 cooker to refit the spring and then putting it back on can be a tricky task; I'll walk you through it here!
Firstly remove the lid from the cooker. There is a large grub screw one side of the hinge bracket to remove first with an allen key. Once removed use a flat headed screwdriver to wiggle the adjusting pin on the opposite side and the lid should lift free. You may find it easier to lubricate everything prior to starting this with some WD40 or similar! Remove the remains of your broken spring.
To refit first slide the hinge pin back into the hinge and through the spring.
Now raise the lid above the spring and drop it down towards the hinge block with the prongs of the spring going into the lid where they should.
Now pop the adjusting pin into the lid, this must be done from the inside before you drop the lid any further down!
Now drop the lid down into its final position and tighten the grub screw to hold the lid in place. You'll need to adjust the pin on the opposite side in tiny increments to get the lid to sit flat. Job done!