I go by smell. As someone else mentioned, I have to like the smell or it's going to be unpleasant living with that smell on my hair; I have long hair so what it smells like is going to waft up at me all day, too.
I open bottle-tops and sniff. Most shampoos have the same basic ingredients to do the same basic thing, so there's not a lot to choose between them for functionality, so the smell is the main criterion for me.
I also seem to have a high sensitivity for emotional reaction to memories connected to smell --- well, everyone has high connectivity between memories and smell, because the two areas are adjacent to each other in the brain and so we all experience this strongly.
But with me, my emotional reactions seem to be heightened from it maybe a bit more than a neurotypical person's reaction to that connection, and I get too strongly affected by something that smells of a time, place or person I don't want to remind myself of. So I have to make sure the smell, even if nice, doesn't remind me of something that's painful to me.
Someone gifted me a really nice perfume that I actually like the smell of, in itself. But it smells exactly like another, discontinued perfume I used to wear about forty years ago and which now reminds me of a time in my life that I do not like to "revisit" in my memories. So I can't wear it, even though it's not unpleasant.
So with shampoos, just get what smells good to you. Functionally there isn't much difference between them even though the various companies like to claim there is. Some researchers have even found that the cheap ones do the job just as well as the expensive ones.