In your topic-name you said Spectrum Analyzer, and after this you said Network Analyzer.
You can use both devices to tune the antenna.
Using the Network Analyzer you can measure the Return Loss (or VSWR) and Antenna Gain.
Using the Spectrum Analyzer you can measure the Antenna Gain, but your setup needs also o Signal Generator.
For Antenna Gain measurements you need an anechoic chamber or an open-site.
You can use a spectrum analyzer, a directional coupler and a signal generator for tuning your antenna.
Connect the coupler's coupled port to the spectrum analyzer and connect the other two ports of the coupler to the antenna and the signal generator respectively, for measurement of reflected power on the coupled port. Tune the antenna for minimum measured reflected power = min VSWR.