(1) Try and Force Restart your iPhone EXACTLY as shown below and see whether that resolves the issue:
- Press and quickly release Volume UP button
- Press and quickly release Volume DOWN button
- Press and Hold the SIDE button until an Apple logo appears and then release the Side button (Can take up to 20 seconds. (DO NOT release Side Button when invited to Slide Power OFF).Â
(2)  If the above does not work then - Have your iPhone examined at the Apple Store or at an Authorized Service Center for further diagnosis of the charging port and a resolution.
Axel F.