If you work in a Project, Claude populates an "artifact" in the righthand pane.
The hamburger menu lets you select different artifacts, if there are several, and the "Copy" button has a dropdown that lets you either add it to your Project or download the file locally.