In the strictest sense, it is possible to remove and replace the battery in your Nintendo Switch on your own at home. However, doing so isn’t exactly advisable unless you’ve got a few prerequisites.
Firstly, if your Switch is still in warranty, opening the cover would immediately void it. If your Switch experiences any other kind of hardware problem, Nintendo won’t help you. If you’ve already voided your warranty in some other way, then a DIY battery replacement isn’t as big of a deal.
Secondly, Nintendo doesn’t actually sell replacement batteries, so you’d need to source one from a third-party. Companies like iFixit do offer replacement Switch batteries, as well as tools and instructions for installation. It is worth noting that this costs money — as opposed to a Nintendo in-warranty repair, which is free. Nintendo does offer out-of-warranty repair services, but you’ll need to get an estimate/quote on the service to know the repair cost.
That brings us to the third point: unless you’ve already got some basic DIY knowledge, a battery replacement may be a bit too difficult for you, even with instructions. This is not something you should attempt unless you already have experience with small electronics maintenance and handling delicate components.
If you need to have your Switch battery fixed immediately, and don’t mind shelling out for the parts, then you can perform the fix at home — as long as you know how. Otherwise, if you’re still in warranty, let Nintendo take care of it.