You missing out code.
import wixLocation from 'wix-location';
// ...
let query = wixLocation.query;
You need to tell the code that you want to query and what, see here for a great example.
https://www.wix.com/corvid/forum/community-discussion/using-wixlocation-query-results-items
Then you will have a value to use with the setFieldValue call which you can save to your dataset.
Although the example here should have been clear enough.
https://www.wix.com/corvid/forum/community-discussion/wixlocation-to-get-and-use-http-query