Generally speaking, the finer the fiber, the warmer the wool. It’s because with a finer fiber, the gaps between fibers can be smaller, thereby trapping warm air in and blocking cold air out.
By that thinking, the thicker the fibers, the less warm it is. So a coarser wool is not as warm as a finer wool. Since merino is a fine wool, it is warmer than other wools, but not as warm as angora, cashmere or qiviut.
However, ALL wools are warm in a sense. I wouldn’t wear wool in the middle of summer!
Now, regarding the weight of the yarn. A thicker yarn will make a thicker fabric, thereby making a warmer garment. You can knit a denser thick fabric by knitting a heavy weight wool on smaller-than-recommended needles. Just be careful that the fabric isn’t too stiff.