It didnt work it just booted up like usual.
I got retropie image from the raspi imager presets should I go to the image from that website?
No, it's the same image - it doesn't matter how it's installed.
Unfortunately I don't know much about the various 3.5' models for Waveshare's displays - the above config was taken from one of their images, but it looks like there's more than 1 model with this resolution (and supported with different drivers).
I suggest looking at their Wiki page and try one of their images to see which one works (and then replicating the config.txt from the image onto the RetroPie installation) or trying their install script from https://github.com/waveshare/LCD-show/.