Settings > About phone > Build number ~ tap on it 10 times to activate.
Then next time, if it switches off
Settings > System > Advanced > Developer options > USB debugging
Settings > About phone > Build number ~ tap on it 10 times to activate.
Then next time, if it switches off
Settings > System > Advanced > Developer options > USB debugging