Be sure the replacement battery does not have a bitterant coating.
Verify that the battery is placed with the "+" positive side up with the cover opened.
Double-check, using the following support article, that you didn't miss a step when trying to reset your AirTag: How to reset your AirTag - Apple Support