Why is my phone suddenly acting up?

Hello good day, I have a question to ask. The device I have is an iPhone XS which was bought 2nd hand. And has a lot of issues, I mean mostly Hardware. Such as a cracked back glass and the replaced LCD. but the True Tone and Face ID works normally. After a few weeks I started experiencing random shutoffs when I leave my phone charging like idle. And also when I plug in my Wired Headphones it Also panics.the panics indicate a “panic(cpu 3 caller 0xfffffff029de57b8): "i2c0::_checkInterrupts error interrupt;

last write status 10810108 int shadow 00890100 xfer 80000000 fifo 00000002

for device accbuck" @AppleS5L8940XI2C.cpp:503” I just replaced it with a non original battery but transferred the BMS board from it, do I really need to change the flex of the charging cable? Or there’s more that needs to be replaced. Here’s the screenshots from the statistics

Block Image
Block Image
crwdns2934089:0crwdne2934089:0 crwdns2934093:0crwdne2934093:0

crwdns2934109:0crwdne2934109:0

crwdns2889612:0crwdne2889612:0 0
crwdns2934285:0crwdne2934285:0