The LEGEND collaboration has been developing a 76Ge-based double-beta decay experimental program where precise radiopurity measurements of ultraclean materials are crucial. Ultralow concentrations of thorium and uranium, the main contributors to the detector background via their decay products, can be determined by inductively coupled plasma mass spectrometry (ICPMS) and accelerator mass spectrometry (AMS). Here we shall present recent developments in thorium and uranium mass spectrometry methods, together with basics of separation chemistry applied to process different samples. The new possibilities to measure 232Th and 238U by ICPMS and AMS at the Comenius University in Bratislava are discussed as well.