it mostly comes down to cc, and how you play those early levels.
You never want to give a ranged champion an hp advantage 1-3.
as a melee champion, you probably have more cc than them and are more useful with spells rather than auto attacks.
Do your best to cs 1-3 maybe even through to level 4 as safe as you can, don't worry about missing cs you'll need to stay healthy otherwise you'll just get zoned and end up still missing cs anyway. its better to give up cs instead of taking too much poke.
Okay so you've gotten to level 3 or 4 staying rather even with them in hp. You can even ask your jungler to come assist you during this crucial moment.
You know the 3 bushes top lane? you'll going to want to use these so you can quickly go in for a trade dealing as much damage as you can with your autos/spells/auto attack resets like renektons W for example you can Auto-W basically at the same time. this allows you to deal more damage in as short a time frame as possible.
Okay so you did your damage, nice! Now you decide if you wanna back off or stay for an all in?
Maybe if you have an auto attack battle with them while your cooldowns come up, you can kill them with ignite and your spells? idk, every game is different. either stay and kill them if you cant its time to use those bushes.
they're a ranged champion!! they trade back while you're running away that's usually now they end up winning trades right? simply run into a bush and bam they lost vision of you they cant attack back.
now depending on how short your cooldowns are, you can even wait in the bush and quickly pop back out using your spells lol.
there's 3 bushes :D. even if they walk into the bush to get finish of you, you'll already be basically entering the next bush ready to make them lose vision of you again lol.
Remember you're generally stronger post 3-4 when you have all your abilities, there's even a spike at 6 when you can all in them with your ulti.
Most top laners have a really damaging ulti or one that makes them super durable.
Now this is only if you don't let her push, if you let her push and are able to freeze you can freeze under your tower and farm rather safely.
[slayer-jinx-catface] i hope this was helpful !!!
Good Day and goodluck in future games!