Cherry Tree Borer
Cherry trees can exude sap/gum due to any type of stress such as pruning cuts, wounds, cankers, or possible insect pests such as the peach tree borer. We cannot say what caused the damage to the trunk. If you see some 'sawdust'-like material (frass) on the ground below the holes or in the sap exuding from the holes, it could be an indicator of borers. There are no chemical controls for the above.
We cannot see around the base of the tree. Make sure it is not planted too deeply and there is not excessive mulch around the base of the trunk. If so, this can cause decline. You should be able to see the root flare as it goes into the surrounding soil. If you do not see this, Root collar excavation, which is the removal of excess soil and mulch around the root collar (base of the tree), can sometimes be helpful. Carefully remove the excess mulch or soil from the circumference of the trunk to the point where the trunk flares out into root growth. Be very careful with shovels because you do not want to cause root disturbance. Cover the roots with a fine layer of soil. Make sure mulch is no thicker than several inches and away from the base of the trunk. Here is more on planting too deeply.
In general cherry trees are not long lived trees. At this point all you can do is prune dead wood and prune damaged areas back to healthy tissue. If this is in the main trunk this is not possible.
The best recommendation is to keep the tree watered during dry periods. If the canopy looks good all you can do is enjoy the tree and it sounds like you may have to consider removal in the future.
Here is more on ornamental fruit trees https://extension.umd.edu/hgic/topics/ornamental-fruit-trees-preventing-diagnosing-and-managing-problems