The issue you're facing is due to AirTag Activation Lock, which ties the device to the Apple Account that first paired it. You haven't provided us with much information so we will have try to provide you with some basic steps to get this resolved.
Since you have already tried resetting the tag, and that didn't help, it is definitely locked to an Apple Account (aka Apple ID). To regain access to it, you would need to remove it from Find My app on an iPhone that you are logged into with that same Apple Account. After successfully removed, you can then reset it, and then, re-pair it with your iPhone.