As Ryze- or an immobile mage in general, really- facing a Zed, without a doubt the biggest thing to do is adapt your build path. You might want to get your Tear of the Goddess or Catalyst of Aeons early like normal, but unless you're ahead your first item should more than likely be a Zhonyas Hourglass. It's on a longer cooldown than Zed's ult, yes, but the armor helps to mitigate his damage even without the active. Remember, armor counters lethality, not the other way around; lethality might scale, but it still only ignores a flat amount of armor. But then when you take the active into effect, you can use it at any point during his ult; when he initially goes in on you, you can activate it to leave him without a target or a means to attack you. Alternatively if you wanna play aggro or risky, you can fight it out with him, then use the Zhonyas active to save yourself from the death mark trigger.
Ryze's buildpath specifically also offers you a big boon in the form of Seraph's Staff. It's a lategame option sure, but the active can give you a positively massive shield thanks to Ryze's passive and his tendency to build a lot of mana. A shield that you can use to eat Zed's damage if Zhonyas is down, or if you need to hold onto Zhonyas for something else.
With Ryze's kit itself though, you have the biggest assassin cockblocker short of an ultimate: his Rune Prison. When Zed goes in on you, that should be your first instinct- lock him down, then immediately make distance. Unless he can land his Q Zed or his shadows need to be right in your face to deal damage, so the more time you spend away from Zed and his shadows is time Zed can't rack up damage for his death mark popping. If you're especially quick on the draw, the instant Zed becomes targetable again- remember, he always ends up right behind you- use your E and your W immediately. They're both auto-target, so if you can target Zed and he's in range, they'll hit. Zed will be rooted for twice as long as a result of the empowered W, meaning he can't chase you down. After that you can toss out a Q- doesn't even need to hit Zed- and with the shield and speed boost, should be able to outmaneuver and endure his damage. But remember; Zed may not be able to move, but he can still cast spells and auto-attack. Even when you've got him locked down, your biggest priority should still be "get as far away from Zed and his shadows as possible".
After that, bare in mind that as Ryze you have consistent damage output, whereas Zed needs his full kit to capitalize on his ult and thus only has periods of high burst damage. The moment he's used up his kit is the moment he can't fight back, and the moment you should start turning the tables on him.