If you want to get all the rows in one cell, you may try this one.
=TEXTJOIN(",",,IFERROR(FILTER(SEQUENCE(ROWS($A$2:$A$9)),ISNUMBER(SEARCH(B2,$A$2:$A$9))),""))
If you just need one result, you may use trip_to_tokyo's formula.
=IFERROR(MATCH("*"&B2&"*",$A$2:$A$9,0),"")