law, canon 915 of the 1983 code of canon law, to be exact:
1983 CIC 915. Those who have been excommunicated or interdicted after the imposition or declaration of the penalty and others obstinately persevering in manifest grave sin are not to be admitted to holy communion. (See also CCEO 712)
http://www.canonlaw.info/canonlaw915.htm
https://christianrenaissancemovement.com/2021/02/04/a-short-introduction-to-canon-915/