The problem of heavy metal pollution in surface water is severe, primarily originating from industrial emissions, agricultural activities, and urban wastewater. Common pollutants such as lead, mercury, cadmium, arsenic, and thallium pose serious threats to ecosystems and human health. Therefore, detecting heavy metal components in surface water is crucial, serving as a key component in water resource management, environmental protection, and sustainable development. Portable total reflection X-ray fluorescence spectrometer (TXRF) has significant advantages in the field detection of heavy metals in surface water due to its light weight, low detection limit, small sample amount and fast analysis speed, providing strong technical support for water quality monitoring and pollution control.