Stardew Valley is a farming game, animal crossing is more about a “town” or village. But you can always choose how you play them both to an extent. Both are within the same game genre though. RPG, simulation. Oh actually, you do craft in both of those games as well.
As far as farming goes you...