The liver plays a crucial role in detoxifying the body. When cancer spreads to the liver, it can impair its functionality, leading to complications such as jaundice, ascites, and hepatic encephalopathy. Liver cancer itself, whether primary or secondary, disrupts the liver's ability to process toxins, produce essential proteins, and regulate metabolism.