LATTA WILLIAM 27/11/1791 is not yours.
This is the actual OPR entry a different mother.
LATTA WILLIAM JAMES LATTA/JANET MCQUON FR663 (FR663)
M 27/11/1791 496/30 76 Dumbarton
The James in Wills & Testaments (Mill Wright) suggestion is not not yours its a different family. His wife was Isobel Paton, mother-in-law was Jean Donald married to Mungo Paton, Shoemaker. He was from Beith in Ayrshire.
The death recorded as Latter is a James Latta but likely an infant as no age is recorded as there is on the rest on the entries.
Here are some things that might help you.
Scottish naming pattern is handy but if your James is the 2nd son or later son born then his father might not be James would it.
The OPR records baptisms not births and they come from the Scotland’s People
https://www.scotlandspeople.gov.uk Some baptisms will also have the birth recorded it depends on the Parish.
So you want to get married - you and your intended wife go to the Kirk Office they they will draft a Proclamation of Banns with your names collect the required coins, it is read 3 times in the Church and if no one objects you are married. Rarely, do they mention the father of the bride/groom.
Or, if you are pregnant and starting to show you will be brought before what I call the Fornication Department of the Parish where you spill the beans as to the Father's name and he is also brought forward and you are married.
Deaths pre 1855 when Statutory Reg's commenced few are recorded. You have better luck finding these in the burial books of the churchyard/cemetery. And no, they are not online. Again the majority had no stone nor could they afford a stone. There typically several buried in one lair (plot).
Your challenges...not everyone was baptized - it costs coin. Many records are lost especially the further back you go. The other thing you need to realize the OPR records are from the Church of Scotland only and no Churches. If James parents were followers of another Church few of those records are available.
Don