Everyone has their go-to “likeliest problem”. The good part is that they are all easy and cheap to check.
Shooter—have someone who can demonstrate good ahooting with a similar caliber and weight of rifle shoot it…if it shoots for them, its shooter error.
Scope/rings—borrow or swap a different acope and rings on your rifle, or put those in a rifle known to shoot. If it changes, you have your problem.
Try 4 or 5 different brands and bullets, if it starts shooting with one, you have your solution.
Maybe not likely but it IS possible its the rifle. I had a tikka I couldnt get to shoot acceptably well. Everyone suggested all these fixes, and I tried other shooters, more stable shooting rests, about 8 different varieties or ammo, several different scopes and mounts, and never could get it to group as well as my other similar rifles. I traded it in on a different tikka that shoots significantly better (or at least is a lot less finicky). Last resort probably, but its not out of the question.