23It is clear from settled case-law that, in order to determine whether national legislation comes within the scope of one or other of the fundamental freedoms guaranteed by the FEU Treaty, the purpose of the legislation concerned must be taken into consideration (judgment of 16 February 2023, Gallaher, C‑707/20, EU:C:2023:101, paragraph 55 and the case-law cited).