suffix
Suffix attached to nouns, typically used with に to indicate location along a linear feature such as a river, coast, railway, or street.
川沿いに桜が植えられている。
Cherry trees are planted along the river.
線路沿いの道を歩いた。
I walked along the road that runs beside the railway.
沿う is a verb meaning 'to run along' or 'to follow', while 沿い is a suffix that attaches to nouns to form adverbial phrases.
Derived from the verb 沿う (そう, 'to run along'), used as a suffix.