logged in user read and write page

That won’t work as for starters you are missing your page onReady function underneath the import line.

Plus, either you need a event handler to run the query or to write it into your page onReady function so that it runs when the page loads.

Have a look at this tutorial here as it keeps it all on the same page.
https://www.vorbly.com/Vorbly-Code/WIX-SUBMIT-FORM-AND-UPDATE-REPEATER

Finally, if you are calling something from a dataset, then just do it like in this tutorial from the same website.
https://www.vorbly.com/Vorbly-Code/WIX-CODE-AUTO-FILL-FORM-WITH-USER-INPUTS

Also, if you do use getCurrentItem, then make sure that you have the dataset wrapped up in the page onReady function with it’s own onReady function.
https://www.wix.com/corvid/reference/wix-dataset.Dataset.html#getCurrentItem