Hello rakshithm111
Good day.
Has your deviced updated to the latest WW-90.11.162.72?
(settings> system >about phone > software information > build number)
Please check there's debris stuck in the USB port.
I suggest using another USB cable for a check.
Or please kindly back up phone files and factory reset.
Sorry for any inconvenience.