That's illegal under the Magnuson Moss Warranty Act.
Send them a certified letter. Inform them that they need to prove you caused the damage, repair or replace your device, or you'll be taking them to arbitration.
They generally have to pay for the arbiter, so it'll be cheaper to just replace your cheap phone even if they win.
I once tried to do a relatively basic repair on a phone, and ended up really breaking it. Like the touch screen won't work because I broke some shit on the motherboard that now requires micro soldering broke it.
So I send it to a repair company that allegedly does some micro soldering, and they call me to tell me they can't repair it because their diagnostic utility doesn't work unless it's the stock OS (I've been a GrapheneOS user for many years). What they do is... wipe my data and then tell me it's not the screen so they can't repair it.
Then I sent it to an actually good repair shop and they fixed it very quickly, easily understanding the problem. Good repair companies aren't easy to find but damn are they worth it. They're almost always smaller shops and they do not GAF what you do with your phone's software.
It's illegal for them to do that, BTW. They have to prove magisk damaged your battery.
I ran into this with Dell when they tried to claim after market RAM was the reason a CPU core wasn't responding to interrupt requests.
All it took was asking for the diagnostic data showing that the aftermarket RAM caused it to get the warranty repair approved.
You just gotta push back until they cave. Maybe ask for their mailing address for your FTC report or for the number to their legal department (most call centers are terrified of escalating anything to the actual company).
But, don't directly threaten legal action, because they'll stop the call right there.
Don't go to any authorized repair center unless it's still in warranty. Those people don't care about you or your things. They are obligated to service you. Any 3rd party repair person has to work triple as hard and give you double the service to win your business.
Here in Brazil the hardware and software are technically two different products, in such a way that you can't deny a hardware warranty repair due to software modifications. That's the good part.
The bad part is that manufacturers do that anyway because they know you won't pay the legal fees to challenge this in court. This strategy mostly pays off. If you're particularly annoying, or somebody from our customer protection watchdog happens to take interest in your claim, the company will fold and repair the modified device for you eventually.
Samsung have been trying to dodge honouring under warranty for years - check the comments for how much work had to be put in to get them to honour it. It pays to fight sometimes.
I fried the battery charging chip for my HTC dream when I rooted and used it as a router for the family in holiday. I felt it was hot to the touch but I thought "it's gonna be ok, surely it has temperature sensors and it will throttle". High draw for a long time when charging = the chip exploded and it wouldn't charge anymore. Luckily the battery was removable and I already got an external charger for it from dealextreme. But HTC still repaired it for free under warranty even if it was my fault and I gave to them back rooted.
Same for LG when my rooted Nexus 5X boot looped, although that was an endemic problem caused by LG shitty manufacturing (they changed the stance a few months after that, never bought LG anymore)
Samsung should repair it, I thought they were the only ones root friendly left on the market...
you can absolutely do it yourself. be prepared and get the right tools, look up many many guides and videos before you start, but I honestly think it's doable for someone whose never opened a phone. those batteries are an absolute pain in the ass to remove, but as long as it's discharged below 20% you really don't have to worry about it it catching fire or anything catastrophic like you're lead to believe (just be careful ofc and wear PPE)
If it's still under warranty, they HAVE to unless they can prove your modification caused the system to fail. It's no different than the silly stickers that say "warranty void if removed" - that's a nice fantasy for the manufacturer, but at least in the US it's been ruled those stickers mean absolutely nothing. If they're refusing to fix a phone under warranty, contact your local AG and enjoy watching them squirm. Loop in the FTC for good measure.
If it's under warranty, they almost certainly cannot deny the claim for this or really many bullshit reasons manufacturers say like removing a "warranty void" sticker - which is still covered. You can sue in small claims. Check out the Magnuson Moss Warranty Act should you need to prove your point.
In Europe, there are unofficial Samsung phones available 15-20% cheaper than from authorized stores. Just consider how often you need warranty repairs. I've changed 5-7 phones during my life and haven't had any problems with them except cracked screens and worn batteries.
If magisk still works like custom stuff in the days of old, settings could very much change battery draw and charge rates that could cause premature wear of a battery.
Your fault for buying a phone that doesn't respect you: it has efuses (knox). Buying a regular Android phone that lets you fully restore it without a trace is the way to go.