Halachipedia has a good rundown and explains as follows:
When to make the Bracha
According to some it is preferable to say Shehecheyanu before the Bracha on the fruit, however, the minhag is to make the Bracha on the food and then the Shehecheyanu.1
One only makes a bracha on the first time one eats the fruit (that year).2
If one forgot to make the Bracha before eating, one may make it as long as one has not finish eating;3 however once one finished, one can’t make a Shehecheyanu on that fruit.4
1 Halachot Ketanot 1:236 writes that perhaps it is
best to recite Shehechiyanu before the bracha on the food so that
Shechiyanu isn't an interruption between the bracha and eating.
However, he concludes that he should say it earlier like we do for
Lulav and Shofar that first we recite the Bracha of the Mitzvah and
then the Shehechiyanu. Kaf Hachaim 225:24 cites both opinions but
concludes that the minhag is like the Halachot Ketanot to recite the
Shehechiyanu after. Halacha Brurah 225:24 and Yalkut Yosef
225:9 agree. Mishna Brurah 225:11 writes that it’s preferable
to say Shehecheyanu first in order not to make an interruption between
the Bracha and eating. However, Vezot HaBracha (pg 159) writes
that the minhag is to make the Bracha on the fruit first.
2 Mishna Brurah 225:13
3 Yalkut Yosef 225:8
4 Mishna Brurah 225:13, Halacha Brurah 225:23,
Sh"t Besel Chachma 5:27, Vezot HaBracha (pg 160) quoting Rav
Elyashiv