Sounds more like pipe expansion and contraction, especially for PVC drain pipes.

It is very common.

As water flows through supplies and drains the pipes expand and contract with the temperature changes.

If the pipes are installed through holes in framing members that are too small or are fastened with straps or brackets that are too tight, the pipes will rub during expansion and contraction and will make sounds from slight ticking to loud banging.

The noises will continue after water has been turned off or run as it takes a while for the pipes to either cool or warm back to ambient temperature.

The noises can also occur in pipes with no water running as they adjust to changes in air temperature and can even occur with humidity changes as the framing lumber swells and shrinks with moisture content.

It’s probably nothing you should worry about and is a very common and harmless albeit annoying situation.