Replacing a Worn Crank- Specs?

I have an old-ish 2015 model Trek Superfly 9.6 which I'm reliably informed by my LBS needs a new crankset. It kept working loose in the middle of a ride before coming apart entirely- more than a bit of a hassle! I was told this was due to wear on the crank itself... I don't know a whole lot about bikes and finding a suitable replacement is proving difficult. I have a BB95 bottom bracket, my old crankset is an FSA F2000 with a 24mm diameter spindle (I measured it with a calliper). I have a 2x setup. Can anyone fill me in on all the necessary specs I need to consider to ensure I get one that fits? After a brief search it seems I can buy a direct replacement easily enough... Though I was wondering whether perhaps there was something better I could upgrade to, for similar money. Any help would be much appreciated, cheers!