A common guideline in the darts world is that longer shafts often suit lighter darts better (up to about 23 grams), while shorter shafts usually work better for heavier darts.
In addition, your throwing style plays an important role. If you throw the dart with a clear arc, then shorter shafts often work better. If you throw the dart straighter and tighter towards the board, then longer shafts can help the dart fly more stably.
Still, there is no fixed rule that works for everyone. The most important thing is that you try different lengths to discover what feels best for you.
For example, if you notice that you:
often have misses (darts that deviate left or right), or
your darts land unstably in the board,
Then this could be due to the length of your shafts. In that case, it can help to test shorter or longer shafts until you notice your darts flying more stably.