Stellar occultation is a powerful technique that allows the determination of some physical parameters of the occulting object. The result depends on the photometric accuracy, the temporal resolution, and the number of chords obtained. Space telescopes can achieve high photometric accuracy as they are not affected by atmospheric scintillation. Using ESA's CHEOPS space telescope, we observed a stellar occultation by the Transneptunian object (50000) Quaoar. We compare the obtained chord with previous occultations by this object and determine its astrometry with sub-milliarcsecond precision. Also, we determine upper limits to the presence of a global methane atmosphere on the occulting body. We predicted and observed a stellar occultation by Quaoar using the CHEOPS space telescope. We measured the occultation light curve from this data-set and determined the dis- and re-appearance of the star behind the occulting body. Furthermore, a ground-based telescope in Australia was used to constrain Quaoar's limb. Combined with results from previous works, these measurements allow us to obtain a precise position of Quaoar at the occultation time. We present results obtained from the first stellar occultation by a Transneptunian object (TNO) using space telescope orbiting Earth. It was the occultation by Quaoar observed on 2020 June 11. We used the CHEOPS light curve to obtain a surface pressure upper limit of 85 nbar for the detection of a global methane atmosphere. Also, combining this observation with a ground-based observation we fit Quaoar's limb to determine its astrometric position with an uncertainty below 1.0 mas. This observation is a first of its kind, and it shall be considered as a proof of concept of stellar occultation observations of Transneptunian objects with space telescopes orbiting Earth. Moreover, it shows significant prospects for the James Webb Space Telescope.