Short answer: practice.
Long, incomplete answer, but just to get you started:
I don't know how much experience you have with racing sims but they tend to have a steep learning curve. I've been playing bike sims since SBK 2011 and I'm still learning.
I recommend starting with the slower Moto3 class. The slower speed allows you to focus on lines in order to get fast. Being able to set good lines is a must as you move up the classes.
When I learn a new track, I use ideal trajectory to get a general sense of braking markers, turn in points, gears, etc. Then, the ideal trajectory comes off because it becomes a crutch.
Then I put in laps, a lot of laps, followed by practice races because it's one thing to develop my own line, but there's a lot to be learned from shadowing the AI to see where they are strong and weak so that I can improve upon my line and see potential areas that could result in a collision. Not every corner is a passing corner. It's a race, not a hotlapping session, and it's more important to finish the race rather than go for the fastest laps.
I recommend manual gear and manual tuck because it gives me better control of the bike.
If I'm coming into a corner too hot, I can downshift a little faster and use the engine braking to slow me down quicker to compensate. Of course, if I'm already downshifting as fast as possible on a regular basis, then I'll have no reserve for those oh **** moments. Also, sometimes my corner speed will be considerably slower than the AI if I downshift too quickly.
Manual tuck allows you to lean off the bike during cornering which tightens up the turn and allows you to put more throttle down. Tuck once you hit the straight though or the aero drag will slow your acceleration and top speed.
Steering, throttle, and braking should be on analog controls. As such, don't treat them like on-off switches. Use the full range and apply gradually.
Make adjustments to TCS and bike settings as you gain more experience. Some tracks I find I set faster laps with a little TCS, while no TCS work better with other tracks. TCS can be helpful for some corners and put the power down smoother and faster, while reducing the skidding/sliding that hinders acceleration. I haven't done much experimentation with bike settings other than gearing but I'd like to start messing around with cornering adjustments soon.
Using the slowest bike (I prefer the competition), TCS medium (more consistent laps, at least for this track), pro physics, realistic AI, heavy damage, and tire wear: