Make sure to use the latest kernels. My Ryzen 2500U laptop has finally been fully stable and usable after about the 5.10 kernel. There were unfortunately a ton of bugs and issues with Ryzen, especially the APUs, in the earlier kernels. Ubuntu 21.10 or similar derivatives have been solid though.