The reporting on exactly how DNA was used to identify the Golden State Killer is still pretty limited.
It sounds like they submitted DNA from GSK crime scenes to a number of genealogical sites and got back one or more familial matches. From that match or matches, they were able to backtrack to a specific suspect.
Once the suspect was identified, they were able to surreptitiously obtain the suspect's DNA, then they directly tested that DNA against GSK DNA samples, and were able to confirm the match.
It hasn't been stated directly, but it seems like there is plenty of still-usable DNA from GSK crime scene evidence, even though it will now be 30+ years old.