No, you will not get banned if you used Youtube Vanced MOD APK, hence it's not illegal.