Fantastic Four: Rise of the Silver Surfer was originally meant to include Nick Fury, but Marvel prevented Fox from using the character. After Fox's original 2005 Fantastic Four proved to be a box office success, if not a critical one, the studio set about developing a sequel that would introduce major Marvel characters such as Galactus and the titular Silver Surfer. Also featured is Andre Braugher's General Hager. Acting as the movie's authority figure, Hager is an acquaintance of Reed Richards and serves to move Fantastic Four 2's plot along, initially directing the superhero team towards the impending arrival of the Silver Surfer and later sacrificed to the evil Doctor Doom as a way of adding some gravity to the villain's inevitable betrayal.
Released in 2007, Fantastic Four: Rise of the Silver Surfer arrived only a year before the Marvel Cinematic Universe began with the debut of Robert Downey Jr. as Iron Man. To avoid bankruptcy, Marvel had sold most of their biggest characters to other movie studios but, now finding themselves in a more stable position, were looking to dive headfirst into Hollywood with their own live-action adaptations. Marvel had outlined a rough draft for a Phase 1 slate of releases, reacquired key figures such as Iron Man and Thor and were then primed to take on Sony and Fox at their own game.
During production of Fantastic Four: Rise of the Silver Surfer, however, director, Tim Story, and Fox decided that the sequel should include a key figure from the Marvel comics, Nick Fury. As revealed by Story himself in the movie's DVD commentary, Fury wasn't included in Fox's original purchase of Marvel characters, and when Fox approached the comic book giants about using Fury, they were asked to stump up extra cash for the privilege. Not wanting to purchase the rights to another character, Fury's role was reconfigured to General Hager, however some Nick Fury comic lines from Ultimate Extinction #2 did find their way into Hager's dialogue.
According to Story, the idea to have Fury appear was nixed as early as the scripting stage, so this certainly wasn't a late-in-the-day change and, in hindsight, it's easy to see why Marvel weren't keen on letting Fox have their way. In putting together the early designs for the MCU, Marvel laid out a series of ten movies, one of which was a solo venture for Nick Fury. No longer in desperate financial need and with most of their major characters already sold off, Marvel surely would've been loathe to ship out any more major names, especially ones they were planning to work into their own movie series.
While the Nick Fury solo movie never came to pass, the character has obviously been integral to the formation and success of the MCU, bringing together the Avengers and appearing in the likes of Captain Marvel and Spider-Man: Far From Home. If Marvel had sold Nick Fury to Fox, there's no doubt the development of the MCU would've been very different. Marvel could've used a different character to bring the Avengers together, but few carry the weight, connections and history of Nick Fury and the assembling of the Avengers might've felt less important without him.
Conversely, Fantastic Four: Rise of the Silver Surfer would've likely been improved by Fury's presence. As well as providing a deeper connection to the comic books, purchasing Fury's rights might've allowed Fox to introduce SHIELD to their movie universe, opening up several new avenues for a potential third movie to take. While this may have saved Fox's Fantastic Four franchise, it also would've deprived the world of Samuel L. Jackson's Nick Fury, so it's safe to say Marvel made the correct choice in not letting their man go.