Chosen Solution

I was charging my onplus 5 on the company provided dash charger. but suddenly it got switched off. and when I tried to switch it on I got the Oneplus logo but it is not going any further.

If I understand your question correctly, you are saying that upon turning on the phone it stops at the oneplus logo. I would recommend clearing the cache partition. This will not delete any of your data. To do so follow these steps. Power down the OnePlus 5 Boot the OnePlus 5 into Recovery Mode Tap on the language of your choice Tap on the Wipe Data and Cache option Tap on the Wipe Cache option Tap the Yes option when asked to confirm Wait for the OnePlus 5 to clear the cache partition Then tap on the Reboot option to restart the OnePlus 5