Apple support MacBook battery changes on machines up to 10 years old, but only directly from the Genius Bar at an Apple retail store, and it’s then shipped away to be completed.
It’s a truly painful process, whereby it’s only subject to availability, you can’t see if a battery is available before attending, (I live 80 miles from my nearest store) and you can’t mail in the machine.
I had one done recently, and the “new” battery itself was physically 6 years old, and now only holds its charge for a couple of hours and Apple won’t do anything about it.
So, not impossible, but it should be easier.