Sonic's bait and punish style is quite effective against Ryu. Ryu's ability to pressure is not as powerful in this MU because of Sonic's speed, spacing fairs, bairs and Hadokens generally carry some risk because Sonic has the mobility to be able to get around them and punish Ryu.
Ryu straight up beats Sonic in QCQ, his frame data and combos give him a significant advantage over Sonic's rather bland normals. The thing is though, Sonic doesn't necessarily have to be engaging you all the time, so he can avoid these situations. Good Sonics will rarely put themselves in a QCQ situation intentionally, relying on baits and speed until they see an opening and since he can attack while moving, Ryu can't exploit his great normals as easily. Ryu wants to be in a range in which he can react to Spin Dash, but Sonic's speed means he can close the gap easily and begin his mix ups which Ryu doesn't have an easy answer to. Patient is your friend, pre emptively throwing out attacks hoping he'll spin into them will get you punished. Ryu's weight and sluggish air mobility make him fairly easy to juggle, so Sonic can easily capitalise off of one mistake. Like in many MUs you're basically dead if you have to sideb to recover, whilst Ryu lacks answers for Sonic's recovery. If Sonic gets the lead its really hard for Ryu to approach Sonic, since his mobility isn't the best, so its difficult for Ryu to exert pressure. FA isn't that good in this MU either because most of Sonic's attacks are multihit.
Those things alone make it sound bad but Ryu's punish game is so absurd it helps him significantly. Although Sonic can get a lot of hits on you and get you to high% fairly easily, his kill options rely on reads or situational set ups. Ryu on the other hand can hit Sonic a few times and easily make up all the damage because of his crazy damage output and low kill%. Since Sonic will most likely put you in rage for quite a while, comebacks against him are sure to happen considering how ridiculously powerful Tshoryu is. Ryu can further extend his hits by exploiting Sonic's bad disadvantage, Sonic may be difficult to catch in neutral but once you get him in the air or in a corner you can dish out strong attacks and easily make up for all the damage.
Overall Ryu in this MU runs hot and cold, whilst Sonic has tools to beat most of Ryu's kit, Ryu can abuse his much better punishes to even the playing field.
Concept Match:
https://www.youtube.com/watch?v=NozDGSxaHf4
45-55