Both are great games, with 1 being a little rough around the edges but still very playable. The gameplay is different enough that it’s worth playing them both imo. Story might be better if you play 1 first, but I played through 2 first, then went back later to play 1 and was pleasantly surprised how good it was.
I probably vehemently disagree with some recommendations to play BG 1 and 2 btw, your mileage may vary. It requires very specific builds and knowledge of DnD, or lots of trial and error. You can easily build a well rounded group and find yourself unable to progress because of lacking one very specific thing. If that doesn’t sound to annoying, it might be worth a shot. If nothing else, rolling characters is fun.