Hi Melissa,
Surface power supplies can be used across devices, but they don't all provide the same amount of power to keep your device charged. You want to use a power supply that provides at least the same wattage as the power supply that was designed for your Surface.
Surface Pro 4 provides 31W while Surface Pro 7+ was designed for 60W.
More info: Surface power supplies and charging requirements - Microsoft Support
Hope this helps,
Greg