After graduation, Lam worked as an assistant to legislative councilor Ip Kin-yuen for five years, but he found the Legislative Council too bureaucratic.[4][2] Aiming to pursue a career in community service, he co-founded Community March with several social activists in 2017, a community-service-based political group, serving as its convener.[2][5] He began focusing his work in Mong Kok East that May,[2] and resigned as a councilor assistant in December 2018 to commit to full-time community service.[6]
In 2018, Lam declared his candidacy for the district councilor position in the Mong Kok East constituency.[2] He won the 2019 Hong Kong local elections with over 60% of the votes against then-incumbent Wong Kin-san.[6] In June 2020, he and Yue Wan district councilor Chui Chi-kin were arrested for participating in a protest march in Mong Kok.[7] In October 2020, Oriental Daily News reported that a Yellow economic circle market was held at Lam's district council office, raising concerns about compliance with usage regulations and COVID-19 social distancing measures.[8] Lam responded that his office shared space with an NGO, and the market was held only within the NGO's area with government permission.[8] He resigned from Community March that same year and registered to run for the Kowloon West constituency in the 2020 Legislative Council Election, although the election was postponed due to COVID-19.[4][9] In December 2020, he expressed interest in running for the 2021 Hong Kong legislative election.[10] In May 2021, Lam announced that his office would no longer accept flowers from the public for the 2019 Prince Edward station attack due to multiple warnings from the Hong Kong Police Force since November 2020.[11]
In July 2021, before the enactment of the Public Offices Ordinance 2021, Lam resigned as district councilor.[12][13] Since his district council office still had a lease, he converted it into a shop called Saan1Haa6Gin3 (Chinese:山下見) while continuing to provide community service to local residents.[12][13] In August 2021, Lam ran for the election of the Convocation Committee at the Chinese University of Hong Kong.[14] In January 2023, the Independent Commission Against Corruption issued warrants for Lam and another legislative election candidate Sum Sung-sheung, accusing them of "making a false declaration of election expenses totaling HK$68,000" for the postponed election.[15][16] The case alleges that Lam and Sum submitted nomination forms to the Registration and Electoral Office on the same day the government announced the postponement, including purchases of several electronics that the ICAC claims were "lodging false or misleading election return".[15][16]