Recognising the behaviours and patterns is definitely the first step, as you said!
I would wonder if these are linked to sensory seeking and general under-stimulation, which would also link with dopamine seeking. Your body is needing stimulation (could be a specific sense or in general), and eating and masturbation is just what has been latched on to. I don't think there's any guilt or shame around either of those, though I certainly understand and relate to having those feelings.
Perhaps finding some intensely satisfying snacks that you're happy having one or a few of? Maybe trying to prioritise other sensory aspects too. If cold is something you might respond to then perhaps frozen fruit could work. Frozen grapes can be satisfying as an eating sensation whilst not being too high in calories (if that is a concern). Frozen berries would also work and provide better nutritional value.
If it's specifically the less nutritional or higher "guilt" foods that you crave, then you could also try freezing them. You get the physical feedback of cold and more bite/chew needed for eating them, whilst also having had a cookie or a brownie or chocolate. I keep a stock of frozen cookies in my freezer from whenever I bake, and will have one most days whilst actively losing weight and prioritising nutrition overall. Sometimes you just want cookies and that's ok! Heat could be another one, say you warm something up to have when you want a snack and then you get the sensory feedback of heat as well as the taste. Crunch could be another. Spice too.
I used to struggle with binge eating a lot and had a bad relationship with food and understanding nutrition for most of my life. I could easily devour packets of cookies at a time even after having had a huge meal, and still not really be satisfied. Things have thankfully improved for me in the last few years after I started researching nutrition and understanding my own experiences and the variety of trains why people binge. For me, a big part of that was comfort and control over not knowing if or when I might be able to have certain foods, and a lot of restrictive thinking and assigning "good" and "bad" labels to foods, as well as guilt and "should" vs "shouldn't".
I think part of overeating also ties to interoception issues with recognising when I'm full. Not sure if you relate to that? I've recently been experimenting with including higher sensory ingredients with my meals (spicy, sour, crunchy) and found that I feel more satisfied with the meal and can better recognise that I've eaten afterwards and not immediately be thinking about eating something else.
Hormones can also have a big impact on sensory seeking, which can in turn mean changes in sensory regulation and, in this context, appetite and libido. Perhaps if you can identify whether you're engaging in these activities because you need stimulation of any kind or if it's specifically that you want a certain taste/texture from food, or if you're actually hungry and just have a high appetite at that time. Similarly with masturbation, do you think it's specifically that you're seeking general physical sensations or is it that your current libido is high and you just have the need for masturbation in particular.
These thoughts are based on my understanding of a female hormonal system. I don't have much understanding of how other hormonal systems might affect these things, though I still think exploring those areas might be usual regardless of which hormonal system you're working with! Tracking these habits over a month or two might also help!
Lastly, and I hope it's ok to say, I would really recommend trying to understand why you feel disgust and guilt over certain foods/binge eating and masturbation if you feel able to tackle the mental health side of things. Those kinds of feelings can make so many aspects of life, recovery, and self-care harder to manage and understand and also make you feel worse overall. Viewing these subjects objectively as just things that happen and that have no moral value or implication can also help, particularly when trying to understand why they're happening and when trying to change those habits without the shame, blame, guilt and disgust surrounding them.