If not, how did they secure their houses and belongings? I know that locks have existed in one form or another for thousands of years, but I’m curious about how widespread and common to people outside the higher socio-economic class they were.
Having visited quite few well researched rebuilt medieval villages it is mostly assumed that the average household would not have the possibility to lock the door. My answer is limited to Europe in medieval times (and Central Europe at that).
In some areas barring the doors seems to have been uncommon even in the late 18th century (see for example Goethe’s travel diary about his Italian journey). When they were barred in medieval times it was mostly by bars. Those kept animals and people out - but the doors were usually barred from within (see Türschloß und Beschlag von Fr. W. Schlegel, 1952; nice illustration of a trap-bar design found here: https://schliess-anlagen.de/holzschloss/)
It is important to note that lock and keys would have been quite expensive for the average person in medieval times. Until the mid 19th century locks were handcrafted, using lots of precise Labor and - for the time - expensive material.
according to the Mittelalterlexikon (Encyclopedia about Medieval Times, https://www.mittelalter-lexikon.de/wiki/Schloss_und_Schlüssel ) metal locks and keys were mostly limited to higher clergy and noble households. A richer peasant or trader may have had a lockable chest or something.
So, the first answer is: uncommon, not very widespread.
How did you secure your house? Well, the first question I would have is: how often has someone tried to enter your house and was only held back by your lock? It is a general misconception that the reason we are not constantly robbed is locks and security systems. The best protection against crime is a functioning society and the belief of people in the legal system. As long as enough people assume there will be prosecution and punishment of those who do not adhere to rules they are emboldened to stick to the rules themselves - which is actually usually a natural inclination of most members of society anyway.
Also, village communities were more tightly knitted and watched out for each other. Peasant homes would seldom be empty, there being the elderly and young children about - if not in every home then in every neighbourhood. And at night time the barred door would come into play. Lastly the fear of a punishing God may have also played a part.