48V coupling into digital signal
Noise is a result of many things:  inductive signal coupling, conductive transients , inductive capture errors grounds from probe being to long, and lack of balancing noise from signals. (both need to be balanced and have low common mode impedance). Also reducing impedance of signals improves attenuation.

Translated: This means twisted pairs on noise thruster pair , CM choke with Pi filter caps to earth ground.  CM choke on long signals or shielded twisted pairs with earth ground shield. Learning how to measure a noisy ground with a scope and get a flat trace ( many examples in this forum, some which I have written). This is exclusively above 10MHz impulse type noise due to ground clip inductance length and 10:1 probe coax capacitance.  Ideal is remove tip and gnd clip and use pin and ring of prove between 5mm spaced test points with good grounds or A-B probing.  Floating grounds gives rise to common mode noise when imbalanced impedance.

Summarized: Balanced pairs, shielding, filtering, CM shunt caps on either side of CM choke.

This is not an explicit how to fix, since the how to create these signals was not given, yet the treatments are common and many alternative methods may work.

After you have considered these basics then you can consider filtering, and if needed opto-isolation.