Dogs can look upward to a certain extent. However, their neck muscles lack the same range of motion as humans, making it difficult for dogs to see directly above them.
Dogs are capable of moving their eyes upward toward things above them. However, their necks provide minimal upward mobility, and dogs can only extend their necks a limited distance. As a result, while they can look up at humans who are in front of them, they can't see things that are directly above their heads. To compensate, dogs often move their entire bodies so that the objects they are trying to see are in front of them. When a dog is lying down, its range of motion increases slightly, and it can cock its head farther back.