This really depends on the youngster's sense of responsibility, but I initially would give them my key at the door and ask them to lock/unlock the door. Depending on the lock, that may not be a simple task. They would then return my key to me. They were aware that a key was a "grown-up" responsibility. At some point, I think they were 7 or 8, they'd be provided a key with the understanding that thy were being entrusted with it, but they were not permitted to bring friends into the home when their mother and I weren't home. They could open the door and enter the house unaccompanied and have a snack or start their homework. To avoid lost keys, the key was attached with a short length of paracord (550-lb test suspension line) sewn into the lining of their pack, to the interior of a coat pocket, or attached with a snap-ring to something they wouldn't leave behind at school. They're 28 and 22 now, and both are on their own, but I really don't remember either of them losing a key.