Babies transition thru stages in life.
Under 6mo they may be interested & happy with everyone, then go thru an awakening to realize how much they depend on you. This results in separation anxiety, a normal finding.It varies with child & situation & may continue for some time. They grow up understanding you, but not new people, settings, etc. Work with them to enjoy such events & this should pass.