When travelling in the Greater Copenhagen area, you can take advantage of the S-trains, which connect Copenhagen's city centre with the outer areas – including Virum, where Sorgenfri S-train station is located. Sorgenfri S-train station is part of the Nordbanen line, which runs from Holte to Copenhagen. On the Route Map, this stretch is illustrated as Line E and runs between the terminal stations of Holte and Køge. From Sorgenfri S-train station, you can travel northbound towards Holte and southbound into Copenhagen's city centre, from where you can continue onwards towards Høje Taastrup.
If you are travelling from Sorgenfri S-train station to Copenhagen or vice versa, you should expect a journey time of just under half an hour by train. From Copenhagen, you can transfer between all 6 S-train lines, as they all pass through here. Take a look at the Route Map to get an overview of the stations on it.