You see a Nikon lens you want, and then you look at a third party lens and see it is a lot cheaper. You think to yourself, wow, this is a lot cheaper and will work nearly as well. Typically, that is the case with going third party. The Nikon AF-S NIKKOR 24-70mm f/2.8E ED VR is currently selling for about 1900 dollars. The Tamron SP 24-70mm f/2.8 Di VC USD G2 is selling for about 1100 dollars. The Tamron has slightly worse reviews on Amazon than the Nikon lens. Logically, it seems you would get a better bang for the buck with the Tamron.
Here is the bad thing that sellers will not admit about third party lenses. A third party lens might not work with future cameras, or will not work in all modes. For instance, on the Nikon D850 Nikon added more focusing points. Any Nikon lens works fine on the camera. Unfortunately, due to having more focusing points, third party lenses did not focus very well. Some companies did come out with updates, but you were out of luck if you had an older lens.
With a Nikon D850, any autofocus and manual focus Nikon lenses made since 1977 will work with the camera. Nikon makes sure that their lenses will work. Nikon does not care about third party lens. I have heard stories of people updating their cameras, and their third party lens did not work.
Future compatibility is one reason why Nikon lenses keep a much better resale value. You can buy an old Nikon lens and know it will work. If you purchase an old, third party lens, it is a gamble if it will work properly.
If money is tight, I recommend buying a used Nikon lens over third party. Nikon also typically supports repairs on lenses longer than third party companies.
On occasion, third party manufacturers will make focal lengths that Nikon does not make. I had a friend that loved a zoom from Tamron because of the focal length, and Nikon did not offer an equivalent focal length. In this case, he had no choice but to buy an aftermarket lens.