"48v" is a generic term, not an actual voltage, in regards to controller labels like that. The parts inside are almost always capable of at least 63v, often higher so they would still have some margin even with a 52v pack which charges to 58.8, 4.2v higher than a 48v pack does. The main diference, operationally, is that a controller for a 13s (48v) pack has an LVC that is lower than that usually used for a 14s (52v) pack, and the battery meter on the display would show full longer, and may never show empty, but if the 52v battery is correclty designed and built with a proper BMS it'll protect itself with it's own LVC.***
If you're replacing it anyway, it won't hurt to try the new pack on the old controller, and if it works it saves you money, time, and headaches.
If you prefer to just change it out untried (which is fine), and require that the new controller be labelled to work on 52v, and have all the right connectors, wiring, and functions to be plug-and-play with your old one, you're going to have some research and shopping ahead of you to find that.
Note that even if a new controller has the same connectors, there is no guarantee the wiring inside is the same, and no guarantee that the controller supports the functions your other hardware requires, etc. (or the functions you want it to have).
There are some "standard" connector wirings, for most of the waterproof (julet, higo) plugs, but not every user of those plugs honors the common wiring versions.

For the non-waterproof ones, there are a few commonly used patterns, but again, not every place uses those, and not every place uses the same wire color to mean the same thing (not even red for positive power and black for ground is always honored, which has resulted in various blown up electronics).
One common example: If the new controller doens't have an autolearn function for your motor's hall and phase wire combination, and it's motor cable is wired differently than your present one, you'll have to (depending on whether you have molded or open connectors) depin the connector or cut open the cable on your motor or your new controller to experiment and find the right combo, and then repin the connector or splice the wires back together in that order.
So, you have to ensure it's not only the same connectors, but the same wiring order, whcih is difficult to do unless you find the same controller brand/model (and even then..no guarantees).
Functionally, it depends on what's on the bike already, and how it works for you, whether a new one will work the same. Some controllers have soft-start, so they ramp up slowly when you start using throttle or pedal control. Some start instantly to the level you're commanding. Some have fewer assist levels than ohters. Some have throttle always overriding pedals, some don't. Some have complex and more usful ways the PAS operates, some just go full speed at the chosen assist level if you pedal at all. Some require a different PAS signal than others, or a different throttle voltage range. Etc.
***Because it's harder on a battery to run it down to it's safety cutoff LVC, rather than letting the controller protect at a higher level, it's a good idea to test out where that cutoff really is, and then mark your display or note the point at which this happens, and don't ride down to that point regularly.