Off the shelf 500w ebikes are made for 25 mph. Their controller and display are set for legal limits. Those that can be unlocked usually have an advanced parameters menu that requires a password from the manufacturer or dealer. Those that don’t have this option need to be tricked, most of the time replacing controller and display. Then, it won’t give much more power and speed unless you replace the battery, or rebuild it bigger. If you replace the controller with one that is more powerful, it is likely to exceed the power capacity of the original battery.