Is there any way I can edit the fill so it stays in between the red lines?
It’s impossible to address this accurately from so little information. Is the “red line” a stroke you have applied to an object? The black shape appears to be a different, separate object from the one that has the “red line”. An Illustrator object has a fill and a stroke. Create an object, apply a black fill and a red stroke to the object and the fill will be confined (“stay in between”) the object boundaries. If the object is a closed path it cannot do otherwise.
When producing complex vector illustrations it’s important to fully understand how vector objects work and how the layering and stacking order affects what you see. For this reason I suspect — though I can’t say for sure — that the problem here is a misunderstanding of vector illustration principles.
That said, a not uncommon ‘problem’ when a fill appears not to stay within the bounds of an object is that the object is not — although it may appear to be — a closed path. There may be two unjoined anchor points one on top of the other. This can give the appearance of a closed path, but when a fill is applied Illustrator draws the fill between the two open ends of the path and it may appear to ‘go outside’ what you think is a closed object path.
If I was given this file and asked to solve this ‘problem’ I think I would need to look at how the illustration had been constructed object by object before I could identify where the ‘problem’ lies.