There are a lot of factors that go into it.
Depends how tall you are. A large rider will get a lot out of 29. A smaller rider might appreciate 27.5 or 26.
Looking for new + modern tech. Not a lot in 26 size.
Riding modern mtb technical trails. A lot are now being made with FS, disc and 29r capability in mind. Flow trails or non technical stuff can usually be ridden with 26.
And budget. If it's limited, a good used 26r might do. If you are spending enough for new, and the above works in its favor, you would get more bang out of a 29r. Larger gear range, better suspension, better brakes, better clearance.