I don’t suggest this. Instead, I recommend Manjaro’s own pamac. It comes with Manjaro, and does a lot more things automagically that you’d need to do manually if you used yay.
Also, be careful of XY problems, they are quite common, quite easy to make and can cause many hours of grief. I suspect this question is an example of one.