I’ve played through Terraria. I like Stardew Valley way more as well. Both games scratch certain itches for me but SDV scratches way more of them and way more variety.
Emotional, musical, technical, optimization, engineering, planning, combat. I would say neither game has great combat. Terraria is a bit better for the technical platforming and character control. But SDV overall is just a lot better in terms of music, story, immersiveness, attachment, and the feeling of accomplishment.
SDV is still the only game I’ve ever played that changed what I want to do with my life. That’s pretty special!