I don't have any really solid advice, since most of my experience top lane is just playing random Champions and improvising, but, some good general advice would be:
- Book up on anyone and everyone you could face. Knowing every Champion to some small extent will give you an edge in playing against them. It may influence your own picks (maybe the enemy top laner is Yasuo, so you play Vladimir because Transfusion ignores Wind Wall, etc.), or even influence your mode of play (going defensively against counter-engage champions like Kennen, or getting aggressive with farming champs like Nasus, etc.), but having a thorough knowledge of the 130~ Champions in League of Legends is a boon.
- Find Champions you're comfortable playing. This comes in two forms: 1. Class, and 2. Kit. Maybe you like playing Juggernauts that are hard as hell to kill, so you pick up Illaoi for counter-engage strength and teamfight dominance. I could go on, but the gist of it is: Pick a Class and/or Subclass, find a Champion whose kit feels good to use, and take them top lane.
- Be ready to switch modes on the drop of a hat. Yeahp, farming under turret isn't safe when your enemy laner is level 6, going 4/0 because your Jungler ganked after they killed you the third time and won't touch your lane anymore after that. Nope, matches usually don't get any better the more safe you play it, but being able to switch gears quickly and efficiently (going from tower-farming as Aatrox to tower-diving) can usually improve your game all-around.
And, with knowledge that getting owned in top lane sucks, here's some extra advice to take you off the eventual, inevitable tilt;
If ever you start getting pissed off, bent out of shape, or overall mad, in the small respites in the match (grey screen, walking back to lane, etc.), take deep breaths - four seconds in, seven seconds out. I can't guarantee it'll work, but breathing like that has helped me, so it's worth it to throw that in with some gameplay advice.
I hope this advice helps you, though at the same time I'm aware that it might not, considering how frequently I ad-lib in the top lane. I wish you luck as well in your future matches!