In versions prior to 4.0, there is a "Download this question in Moodle XML format" link in the "Preview question" pop-up window, as shown in Figure 1 below. This link is useful because it allows a question to be downloaded from the "Edit quiz / Preview question" page, that is, without having to look for the question in the question bank.
The link was added in 2019 by Tim Hunt (https://moodle.org/mod/forum/discuss.php?d=389500#p1570207 following Tracker MDL-63738. The implementation of this feature was supported by Adrian Perez, Anton Tremetzberger, Bernat Martinez, Daniel Thies, Dominique Bauer, Germán Valero, Hartmut Scherer, Ioana Gatzka, Jean-Michel Vedrine, Jens Eremie, Jetmire Sadiki, Silke Kirberg, Luca Bösch, Michael Hughes, Raül Cambeiro, Roland Boettcher, Samuel Witzig, Sebastian Homer, Shirley Gregorczyk, Stephan Tjettmers, Stephen Bourget, Tina Tanurovska, Ueli Zumkehr, as well as Al Rachels, Rick Jerz, Joseph Rézeau and Marcus Green.
You must keep this link in version 4.0. As Tim Hunt said: "Putting it on the Preview question page isn't brilliant user-interface design, but I couldn't think of anything better, and at least this got the feature implemented. We can always improve the UI later." Improving the user experience is not about removing a feature that is useful and used by everyone. This consists of improving it, for example in the form of an "Export as Moodle XML" button on the "Preview question" page, brilliantly proposed by AL Rachels (https://moodle.org/mod/forum/discuss.php?d=432404), as shown in Figure 2 below.
Figure 1 "Download this question in Moodle XML format" link in the "Preview question" pop-up window - Moodle versions prior to 4.0.
Figure 2 "Download this question in Moodle XML format" link as a "Export as Moodle XML" button in the "Preview question" pop-up window - as it should appear in Moodle 4.0.