If you remove the resonator from your BMW, it won’t automatically void your warranty. However, it could have an impact later if you have repairs that you’d like to have covered under warranty.
If you run into an issue with your exhaust system after removing the resonator yourself, it’s possible that your warranty won’t cover repairs since you’ve tampered with the system. As such, it’s typically best to leave your car’s parts alone until your warranty expires, at which point you can start adding or removing whatever you choose.