Yes, just make sure in BIOS you change the PCIe Slot from 4.0 to 3.0 to make it more compatible.
That GPU card is not supported by AMD driver updates anymore so if a game or program requires a newer video driver than 06/21/2021 than you are out of luck.
You can go to these two websites to check whether your GPU or CPU will bottleneck and what percentage. This is good data in case you play a lot of games.
FPS & Bottleneck Calculator
Bottleneck Calculator
But for normal computer use such a browsing or running various apps, you should be okay with either of the processors you mentioned.
NOTE: generally some factors in whether a GPU card will work in your PC are:
1- Size of your PSU (not powerful enough to run GPU card)
2-Motherboard has PCIex16 x16 or x8 slot
3-PSU has PCIe GPU Power cables to connected to the GPU card if applicable.
4- GPU card will fit inside your Computer case