Andersen started playing football at the age of 4 for local club Greve Fodbold, where he played from 2000 until 2009. He then joined Copenhagen’s academy, School of Excellence, before leaving for Midtjylland when he was 15. At Midtjylland he moved into the talent academy in Ikast where players like Simon Kjær, Winston Reid, Erik Sviatchenko, Viktor Fischer and Pione Sisto had stayed before him. In April 2013, before he had made his first team debut with Midtjylland, Twente sent out scouts to observe Andersen, and offered him a one-week trial, which he accepted. Four months later, he signed a youth contract with FC Twente for a fee rumored to be around 5 million Danish kroner. The plan was to start in the youth team in order to acclimatise, and progress to the senior sides after about 6 months.
Twente
Though he was still an under-19 player he was promoted to the senior team and on 8 November 2013, Andersen made his first appearance for Jong Twente playing the whole match. He did not play any matches for the first team in his first season, but already in his second year at the club he was promoted to train with the first team squad with players like Dušan Tadić, Hakim Ziyech, Jesús Manuel Corona, Quincy Promes, Andreas Bjelland, Kasper Kusk and Kamohelo Mokotjo. On 7 March 2015, he finally got his chance in the first team debuting against Willem II, and playing the last 20 minutes. A week later, he signed a new contract with Twente until 2018. In 2015, Andersen won the prize for U19 talent of the year by the Danish Football Association. On 22 March, he was named in the starting eleven against Groningen and scored his first goal for the first team. He slowly got more and more time on the pitch for the first team. He continued his development and became almost a regular part of the first team squad in the 2015–16 season.
On 26 August 2017, Andersen signed a contract with Serie A club Sampdoria. He had offers from other clubs in different leagues but chose Sampdoria to develop in Serie A. Andersen made his debut on 25 February 2018, in a match against Udinese. He played seven more matches that season and from the beginning of the 2018–2019 season he became a regular starter attracting attention from bigger clubs. In his second season he only missed one game due to a ban. Sampdoria offered him a new contract until summer 2022 which he signed on 8 November 2018
On 12 July 2019, Andersen signed a five-year contract with French side Olympique Lyonnais. The transfer fee amounted to 30 million euros, meaning Andersen became Lyon’s record transfer. It was also a record high transfer fee for a Danish football player. On 2 October, he made his debut in the Champions League against RB Leipzig, and on 11 November he scored his first Champions League goal in the 3–1 win against Benfica.