Replacing a B-knuckle tension spring
It takes a lot for springs to weaken from normal use but not break. There are applications where that's more of a thing, but little if anything on bikes unless maybe it's of particularly bad quality.

Usually if a derailleur spring has this happen it's because the bent nubs of the spring that engage the other part get bent or broken, or the holes they poke into get distorted, or slop at the joint allows them to slip out of the holes, or the spring has become distorted and weakened by being forced too much.

Some derailleurs allow disassembly of the knuckle but yours almost certainly doesn't. Just replace it. New similar derailleurs are extremely cheap.