Ma'am implies age.....
You can't really call a 25 year old Ma'am.
Calling a 50+ woman " Miss" won't fail very often.
" Young lady" works well for some....not my style, but it is sort of charming. I couldn't pull off calling my 65 year old neighbor " young lady" , when I'm 47, madam doesn't work either.....I use her first name , " Carol"