Cream and half-and-half contain high levels of fat and calories. You might be able to get away with giving your dog tiny amounts in moderation, but this certainly shouldn't be a significant or regular part of their diet. The fat and calories can contribute to obesity, leading to other health issues like diabetes, joint problems, and heart disease.
In very small quantities, mixing half-and-half with your dog's food might serve as an occasional treat for good behavior. It might also be a good way to get them to take medicine. But again, this shouldn't be a common thing.
Keep in mind that many dogs are lactose intolerant, which means that eating dairy products could lead to stomach issues like vomiting or diarrhea.
While adding some treats to your dog's diet might make them happy for a moment, a balanced, healthy diet will help them live a longer and happier life. If you do give them small amounts of cream or half-and-half, proceed with caution and monitor their reaction. (The safest thing is to not do it at all.)
As always, before introducing a new food item into your pet's diet, consult with your veterinarian first. If your dog eats cream or half-and-half (or any food) and is showing signs of illness such as lethargy, diarrhea, or vomiting, reach out to your veterinarian immediately. If they require veterinary care related to eating any unsafe foods, pet insurance can help cover the cost of treatment.