It is generally always best to get the latest model of a computer as it will be supported longer than a previous model in terms of software and operating systems in most cases.
However, if you can find a good deal on an M2, you may want to go for it but remember, if a deal is too good to be true, it likely is (very common on eBay). It is best to only buy it from authorized Apple retailers.
As to 8 core vs. 10 core GPU, for your use would likely not matter and money would be better spent on getting 16GB RAM or more and 512GB SSD or more. With operating systems an especially applications getting more and more RAM hungry it is bets to get as much RAM as you can afford. On the same note, the 256GB base offering for an SSD will also eventually suffer from the same issue of apps and operating systems wanting more and more disk space.