If the battery has swollen then I'd suggest to power it down and don't put it on charge.
Samsung take instances like this very seriously so please visit a Samsung Service Centre or Samsung Experience Store or contact Samsung Support for your region ASAP so they can arrange to assess the phone and advise accordingly.
If I can be of any further help then please don't hesitate. Take care. 😎
Daily Driver > Samsung Galaxy s²³ Ultra 512Gb in Phantom Black.
The advice I offer is my own and does not represent Samsung’s position.
I'm here to help. " This is the way. "