Give a dataset a value of another dataset with code

#dataset

Just call the field in the required dataset and use setfieldvalue and save to add it to the new dataset.

https://www.wix.com/corvid/reference/wix-dataset.Dataset.html#getCurrentItem

 $w("#dataset1").getCurrentItem().fieldName; //for a specific field only

Dataset - Velo API Reference - Wix.com

export function Submit_click(event, $w) {
        $w('#dataset1').setFieldValue('fname', $w('#input1').value)

Dataset - Velo API Reference - Wix.com

$w("#myDataset").save()

You will need to have both datasets added to the page onReady function with its own onReady function too as the dataset needs to load before you can do anything with it.
Dataset - Velo API Reference - Wix.com

This is not the full code that you will need, so do not just simply copy and paste the above, you will need additional code required to make it all work on your page.

So use those Wix API References and use the code examples in there too.