Nothing in this subchapter may be construed to prevent a digital service provider from collecting, processing, or sharing a known minor's personal identifying information in a manner necessary to:
(1) comply with a civil, criminal, or regulatory inquiry, investigation, subpoena, or summons by a governmental entity;
(2) comply with a law enforcement investigation;
(3) detect, block, or prevent the distribution of unlawful, obscene, or other harmful material to a known minor;
(4) block or filter spam;
(5) prevent criminal activity; or
(6) protect the security of a digital service.