PrathamSachdeva I was using the Mi 33 watt charger. The problem got resolved automatically in few weeks.
The one thing that I observed is that, Whenever you want to charge your phone first connect your adaptor to your switch board and turn on the switch,then only connect the type c port to your mobile this way, that problem of USB preferences won’t come.
I beleive that when you directly connect the type c port of your charging cable into phone without turning on the switch,then phone will think it has connected to some low powered device such as your earbuds,and it will try to charge the earbuds,which is not the case when we want to charge. So that’s all you have to take care, Just connect the phone after turning the switch on of the charger.and soon as you continue using the device,the problem will be resolved.