Most likely your cable or cable connection on your phone
Hi, I suggest you please reboot your device in safe mode and check if you are experiencing the issue. If you are not experiencing any issues in safe mode, then the issue could be due to any third-party application you installed recently. To do this, you need to completely power off the phone. Then, power on the phone, and when the Samsung logo appears, press and hold down the Volume Down key. If done correctly, "Safe Mode" will display on the bottom left corner of the screen.
To deactivate safe mode: Press and hold the power button. and Tap Restart.