Doing some stretches before and after would be the normal or recommended sport/fitness thing
not necessarily for cycling though. Like, pro cyclists never stretch. It's a non-impact sport so there are no sudden jolts to the muscles like you get from running or physical exchanges.
I think the idea around stretching is more an 'in-general' rule to improve your general flexibility level. Cycling does compact muscles too, so if anything, stretching after would be better.