They're out of fuel and supplies.
Can't help you on the food, water, and air, but here's how I handled the fuel question in one of my stories:
Commander Isenberg considered the suggestion. "Okay, let's do it. Mister Dupree, start looking for a suitable planet we can scoop from. Miss Tillman, please assist him." Isenberg pressed a button, "All hands, we're going to do a scoop and go in the next ten minutes or so. Get yourselves buckled in." He released the button and turned to the Marines. "Ever been on a scoop and go?"
Lieutenant Zychowski looked confused. "I don’t even know what that is, sir"
The commander grinned an evil grin. "Take a seat and get strapped in. I hope you didn’t eat a big breakfast."
Zychowski strapped himself in the third chair, the trainer's seat, behind Lieutenant Dupree and Ensign Tillman as they continued their sensor search. "What are you doing exactly?"
"A scoop and go," Tillman replied. "We're looking for a suitable gas giant or proto-star to skim off some hydrogen. Or to be more precise, the heavy hydrogen isotope known as deuterium."
"Deuterium? I though the warp drive runs on anti-matter."
"It does. Or rather, it runs on matter/anti-matter reactions. The deuterium is the matter part of the fuel." She looked at the planet that Dupree pointed to and shook her head as she tapped the screen on the line of the sensor reading that indicated it had too many carbohydrates in the mix. He flagged it as a planet to be surveyed at a later date; it might have indigenous life-forms. "What we'll do is fly low over the target planet and use the tractor beam to draw up a bulge in the atmosphere. Then we'll snap-turn back and fly thru that and pull it in with the Bussard collectors.
"We'll hit it at about warp one point four to one point six, or about three to four times light speed. As the mixture is pulled in, it will naturally begin to spin like a tornado. The heavier deuterium will separate due to centrifugal force, and we'll syphon that off. What's left of the hydrogen atoms will be squeezed together at hyper-luminescent velocities. Some of the atoms will be stripped of their electrons and become free ion particles, or be converted to tritium, which is too radioactive for our use, while a few hydrogen atoms will fuse to become helium atoms. It makes a great light show.
"Occasionally, like perhaps one in a hundred million chances, the hydrogen atoms will smash together in such a way as to create an anti-matter atom. These too will be drawn into the Bussard collector via a magnetic guide. With any luck, we'll get maybe one part anti-matter for every fifty thousand parts deuterium, but that's plenty." Ensign Tillman smiled at the Marine. "That's the dumbed-down high school version. If you really want to know what happens, you need to take a couple years of advanced physics."
Zychowski nodded. "So, if this is how you refuel the ship, why haven't I ever seen it before? And why did the commander say to buckle up?"
"This is an emergency procedure," Dupree explained. "Star Fleet has ships specifically designed to gather material to take to a star base for processing. We actually need the deuterium more than the anti-matter. When we're cruising below Warp Seven, the Bussard collectors pick up enough stray matter that the deuterium tank stays full." He look at the Marine and smiled, "As to buckling up, just wait until we hit the atmosphere at three times the speed of light. It's going to be a bumpy ride."
"Oh, so you've done this before?"
Both officers shook their heads. "Nope, never," Dupree admitted, "I think Chief Guzman is one of maybe five or six people on the Magnum who've ever been thru it. Right, Chief?"
"Who? Me? I'm playing this by ear!"
"Bull," Commander Isenberg complained with a grin. "I know for a fact you've done this at least a dozen times."
"Only nine, sir," the older man corrected him, "if you just count the times I was flying the ship," he added.
As always, you can come up with any explanation you want to fit the plot line, as long as your stories are internally consistent.