The first obvious (and therefore not really helpful ha) suggestion:
Experiment. If you're having trouble with a section, play around with a couple different ways of doing it, even try things that seem unintuitive or "wrong", you may be surprised by something.
But now for the real tips:
Think in phrases. First read through the whole piece, and gain an understanding of how things generally play out, where things repeat ideas, what areas are similar to each other, etc. Then go through the piece phrase by phrase, not measure by measure or line by line, but musical phrase by phrase. Phrases are meant to have some sort of internal consistency, so the fingers should help achieve that.
Think in bursts. Usually music is written similarly to the spoken word, in that there are bursts of activity that can be thought of as sentences or words. Since most of the point of writing finger numbers is to help you execute things, and since the most difficult things are those that are fastest or closest together, these bursts of motion are good units to think about your fingers. If the bursts come across right, then the pauses or slower sections between bursts will usually fall into place.
Think in hand positions. As you are figuring out your phrases and bursts, try to understand what chords and scales are happening underneath the notes, and try to lump groups of notes together into hand positions. The biggest fingering challenge is to change hand positions, so if you understand where those positions are, and minimize how often you need to change them, the fingers should be much easier.
Think about where your fingers need to go next. At the end of the day, if you've already successfully gotten to one point of the music, then the previous stuff has been handled. Always think about where the music is going to demand you move next, and try to optimize what you're doing to make those next movements easy. If you need to go up, your hand should be "opened" upwards, etc etc.
Think about "hand symmetry". This one can be surprising. Although hands alone practice and analysis is always a good idea, try sorting out phrases and bursts with the other hand as well. It might be easier to do something in one hand if the other is doing something similar. Of course don't let this be a crutch or let it dictate bad decisions to you, but take advantage of it when it appears.
Make sure your fingers fit the final intended interpretation. One of the biggest reasons practicing in units of bursts and phrases is essential is because that's a small enough amount of information for you to quickly build to full speed and voicing and articulation etc. In the same way that your legs do completely different things when they're walking vs running, your fingers have to do completely different things when they're going fast vs slow or loud vs soft or staccato vs legato. Don't just "learn the notes" and then try to slap that other stuff on top, that other stuff is fundamental to the way the "notes" are actually executed.