Is it legal if a student passed 10th cbse 2016 and failed science 12thcbse 2018 and again do 12th from state board for 2018-20?
No it is not an issue if you are not able to do your twelth from CBSE board you can go for state board it is not a problem. So don't worry you can change your board.
Good luck.