When would my Macbook Pro (Mid 2010) no longer run the next macOS? I had to let go of my white Macbook (2007) because the new OSX would no longer run on it.

Currently Mactracker lists my Macbook Pro (Mid 2010) with a support status of "vintage" but that relates to the availability of hardware parts I read. I am not too worried about that because there have been so many of these machines produced that parts will be around for the next 10 years I bet.

A MBP of 2007 is listed in Mactracker as still capable of running the latest macOS. A MBP 2006 is not. How many more years can I expect to keep running on a new OS with my 2010 MBP though? 3 or 4 years?
The mid-2010 MacBook Pro is the oldest laptop officially supported by MacOS Sierra. This means it is likely that Apple will not support 2010 MBPs in the next major OS update next fall. That being said, with enough knowledge it is possible to upgrade to a new OS. If having the newest OS is important to you, you might want to look at upgrading when the next MBP is released. If you don't mind making changes to the source code of the OS, you might be able to continue pushing new OS's onto your laptop for a few years. However, even without future OS upgrades, I'd guess your computer will be relevant for another 3-4 years.