Welcome to the forum and Z4 ownership.
The most common issues on the N52 engine seem to be oil leaks from the cam-cover and oil filter housings now the gaskets are old and getting brittle. And the electric water pump will die at some point which will result in overheating within a mile so to avoid being stranded quite a few owners replace them as a preventative measure. But they aren't exactly cheap, around £250 for an OE Pierburg if you don't buy from BMW as they charge twice as much for the same part!
I had two in E86s and liked them so much I got a 325i then a 330i with N52s. My first Z4 needed a new water pump at 60K miles, my 2nd seemed to be on the original when I sold it on 91K so how long they last seems to be guess work. My 325i needed one at 135K, but I've no idea if that was it's first or second replacement.
These engines seem to be bulletproof - an E86 owner recently posted on here about his 250K mile example. But as they get older ancillaries like starters, alternators, etc. are likely to need replacing at some point.
Nothing to do with the engine, but rear brake pipes can corrode in front of the passenger side rear wheel. They go under the car in a plastic cover, but road debris that holds water tends to build up in the end of the cover - no need to ask how I know!
I wanted to have that M experience, but I still think a 3.0Si is the sweet spot in the Z4 range in terms of bang for buck.
Nearly forgot to say we like to see photos of new members' cars!