Surnames for adoption children?

Mary

So television has struck an odd question I can't google. Im watching season 2 of Riverdale and without too many spoilers the sisters name a child that was put up for adoption, charles smith. Well this got me to thinking. Is there a system for surname giving to adoption babies? Game of thrones has a system for bastards, but these kids aren't given away usually and do know where they come from, what if it's a doorstep delivery like in meet the Robinsons? Anyone work for an adoption agency?