I will say AMD seems to have come a long way since 2020/2021. I also messed around with an RX580 and ROCm on Ubuntu Server and while I wasn’t as experienced in the world of ML/Data Science then, I remember encountering a roadblock or two when following the official install guide.
I haven’t had an AMD GPU since, but I’ve read and heard many good things. Supposedly Tensorflow and PyTorch work more or less out of the box with the right AMD GPU.