I am pretty sure that I got my moral values from my mother - someone one could hardly fault as to being exemplary with regards good moral values - and a relatively happy childhood. But no doubt I did work out at some stage that not being nasty or selfish towards others made more sense than doing so - and I think I was just more naturally inclined that way too. I always was rather picky with regards friends, for example, and was always more drawn to those like myself. Hence I have not found it difficult to make good friends - and ones that have rarely disappointed. For me it is a bit obvious - one doesn't hopefully want to carry about a burden of guilt for anything one has done - life being simpler when one behaves well and is honest - but of course this can't always be the case. And in earlier times, when I had many issues, I certainly was not behaving as I should - for which I have regrets, but they don't follow me about reminding me all the time of any past mistakes. That is just not helpful. One has to deal with life at the moment - and fortunately for me now, there are no such issues.
I can certainly understand that others with different backgrounds and experiences will have different struggles, so I am unlikely to be judgmental in this regard.
So, for me, it is more an internal compass that governs my behaviour - one no doubt refined over time, but essentially respecting others, treating them as one would want to be treated (not using them), trying to understand their particular perspectives and experiences, and not enshrined in any particular rules or codes - although the Humanist Code seems to me to be as close as I would want to see such.