Hi Pawcards
and welcome to Talking Scot.
It seems, according to IGI - but no reference source, that he married Ann(e) Diack in 1847 & they had a son William in 1850/51.
This looks like William here on IGI - an extract
WILLIAM STUART
Birth: 13 DEC 1850
Christening: 05 JAN 1851 Rayne, Aberdeen, Scotland
Parents:
Father: KEITH STUART
Mother: ANNE DIACK
The records on Scotlands People begin in 1553 for births and baptisms and as the above IGI record is an
extract it will be most likely be there on SP as it is probably taken directly from the OPRs. It would be worth checking the Scotlands People image to see if it mentions if he is a "lawful son" or wording to that effect. That may be one reason which might explain why you have not found a marriage

- the only mention on IGI seems to be a submission as you have noted.
in the 1851 census Keith has vanished, Ann is living with her mother, sister and son William.
Is Ann listed as a widow in 1851? What is Ann's surname given as...and what about William's surname?
Best wishes
Lesley