It is fiberglass wool. Why not just leave it alone? It won’t hurt anything. But I would look for evidence that some rodent has decided to live rent-free in your engine compartment.
Lift the rubber seal and see if it is supposed to tuck under there. I would just nudge it back into place. If it keeps coming out, use a dab or two of RTV or similar adhesive on the liner and push it up against the underside of the lip…