If the RX550 works fine in your computer so will the RX580. Both have the same architecture design except one (RX580) is more powerful than the other one (RX550) and you have two Motherboard slots together available if the RX580 covers two slots when installed.
Also depends on your Processor. If the processor isn't strong enough it will bottleneck the RX580 while it might not be too much of an issue with a RX550.
One thing you need to look at is your PSU. The RX550 only requires a PSU of 350 Watts while the RX580 requires a PSU of 550 Watts. If you PSU is less than 550 watts it will probably be best to upgrade the PSU in your computer.