MacBook Pro will only charge if using a 3rd party adapter after battery replacement I’m  having a bit of a weird situation. After running a program that really seemed to overheat my computer, a few days after my charger stopped charging my 13” Late 2012 Retina MacBook Pro.
It was really old and had some inner wire visible so I figured it was the charger and decided to change it. Without doing a ton of research, i just ordered the best reviewed adapter on Amazon.  When I plugged it in, it didn't turn on but eventually did a SWC and it began charging, however the LED turned green and but the battery seemed to be dead. If it was unplugged the computer would die.
Thinking I needed a battery replacement and having originally thought that Apple no longer supported 2012 because of vintage, I ordered a 3rd party battery from Puredick as well as one from NewerTech at OWC.
I replaced the battery and had some issues with it working and read about the dangers of using a 3rd party adapter. I ordered a new OEM 65W adapter through Apple,  however once I got the battery working, the OEM adapter wouldn't charge. The third party adapter continues to charge it regularly.
I realized it was an 85W adapter so thinking maybe the battery needed a higher wattage, I ordered a second 85W adapter through Apple and that also, did not charge. The behavior was the same for both 3rd party batteries as I tried swapping them out thinking they might be the cause of the issue.
Everything else runs normally except for the fact that the OEM adapters will not charge the Mac while the 3rd party charger will. I'd like to avoid using the 3rd party and I’m worried that this might be a sign of something else wrong With my Mac or that continued use of my 3rd party adapter will exacerbate the problem.
How can I solve this weird problem of genuine chargers not charging, but 3rd party chargers will?
If you have two genuine Apple MagSafe chargers and neither with charge/power you MacBook Pro, but a knockoff charger will, there’s an issue with your MacBook.  More than likely, it’s the DC-In board.
How it works.
In the genuine charger, there’s a chip in the MagSafe connector (not the “brick” but the magnetic part with the green/amber LED) that identifies the charger to your Mac.  If the wattage advertised is greater than or equal to what’s required, it’ll charge.  If not, it won’t and if your computer is on, will even notify you that the wrong charger is attatched.
The way it charges is that the circuitry in the DC-In board detects power from the adapter from the presence of current on the one wire charging circuit.
So, if it’s charging with the knock-offs but not the OEMs, it’s bypassing the wattage check and just “dumping” power into the DC-In board.  You don’t want this, because this is how things get fried.  Why aren’t the knock offs using the identifying chip?  Most likely cost.
The fix is simple: you need a new DC-In board.  See this related answer for more details.  It’s also called an I/O board because some models have I/O ports on it; this one doesn’t. Note: it’s possible that there may be damage to the charging circuitry on the logic board, but without putting hands on, it’s impossible to know.
A few clarifications

The 2012 13” MacBook Pro models require the 60W power adapter
Keep/use the 85W charger as it’s perfectly safe to use a charger with a higher wattage rating than what’s required
Your battery is not really related to charger wattage.  The only thing that will happen is your charging speeds will differ.  The wattage requirement is based on both charging and compute requirements (what it takes to drive the computer).
Only use genuine Apple chargers with your Mac.  Cheap knock offs can end up costing you more!
The last Mac with the MagSafe adapter was the 2017 MacBook Air which was discontinued in 2019.  The chargers will be around for a while longer.  See Apple’s Vintage and obsolete product page for a list of currently supported products.