Is it safe to replace a camera battery with a different capacity one?

I don’t know anything about batteries, I am trying to find a replacement battery for a Nikon Coolpix S33 and can’t find an exact match. I’ve found some that looks similar but have slightly different numbers, shown in attached pictures, is it safe to use these or should I be looking harder for an exact one? First picture is the one that the camera came with, second is one i found online.