Welcome to RootsChat.
As you say, he was baptised in 1773. At that time there was only one parish church in Portsea, St Mary's. But it did have a chapel of ease, St. John's and it is in this register that your ancestor's baptism is recorded. There is no mother's name recorded in the register.
A Mary Elizabeth Hector was baptised 22 Apr 1772, parents James & Elizabeth at St Mary's. There is also a record for a Maria on 4 Sept 1780, father James but no mother's name recorded.
The church of St Mary's that stands at the corner of St Mary's Road and Fratton Road in Portsmouth is not the same church that stood in 1773. It is the same site, but there have been two rebuilds since then. The current building dates from the late 19th century. The original records are at Portsmouth record Office with film/fiche copies at Winchester. The graveyard was cleared of stones in the 20th century.
There is no record of a burial for James or Elizabeth Hector in Hampshire that I can find.
So it is a bit difficult to know where/when to look for their baptisms. Since Portsea was a naval port, it is possible, but not certain, that James Hector might have been in the navy. A look at the original marriage register entry would be the best way forward to see if it indicates a parish of origin. There is no marriage allegation for the couple in the Bishop of Winchester's records but there might be one on a higher ecclesiastical court.
Nell