Sam as a name standing on its own was given to only 18 girls in 2021, versus over 400 boys. But as a short form it's appealing and down-to-earth for both sexes, and heard far more often: There were over 2500 baby girls named Samantha in the US in one recent year and more than 8500 boys named Samuel, so you will hear the name Sam a lot more often than you might guess judging by the numbers for this short form.
Like the wildly popular Charlie, Sam is a nickname that works equally well as a
girls' name as a boys'. All forms considered, Sam is still one of the most popular
names that start with S.