Hello Chloe. It is wonderful that you made a family recipe, and having leftover cream is quite common. Proper handling will help keep the remaining cream fresh for as long as possible.
First, make sure the cream is tightly sealed. If your carton has a screw-on plastic cap, tighten it firmly to prevent air exposure and to keep the cream from absorbing strong odors from other foods in your refrigerator. If it is a fold-open spout carton that cannot be completely closed, I recommend transferring the cream into a clean, airtight glass jar or container.
Second, place it in the coldest area of your refrigerator, which is typically the back of a middle or bottom shelf. Avoid placing dairy in the refrigerator door shelves. Every time the door opens, items stored there experience temperature swings, which significantly accelerates spoilage. Your refrigerator temperature should ideally be set at or below 40 degrees Fahrenheit (4 degrees Celsius).
Under these conditions, standard opened heavy cream generally stays fresh for about 7 to 10 days, and ultra-pasteurized varieties can often last even longer. Before each subsequent use, take a moment to inspect it. Fresh cream should smell sweet and clean; if it develops a sour aroma, curdles, or forms clumps, it should be discarded.
If you do not plan to cook with cream again within that timeframe, you can also freeze it. Pour the cream into ice cube trays, freeze until solid, and transfer the cubes to a freezer-safe bag for up to 3 to 4 months. While thawed cream may separate and won't whip into peaks, those frozen portions work wonderfully when melted directly into soups, pan sauces, or your next batch of pasta.