To prefill the value you will need to use wixQuery and query the collection to find the relevant value.
https://www.wix.com/code/reference/wix-data.html#query
Check out these forum posts:
https://www.wix.com/corvid/forum/community-discussion/pre-fill-form-fields-with-values-from-previous-record
https://www.vorbly.com/Vorbly-Code/WIX-CODE-AUTO-FILL-FORM-WITH-USER-INPUTS
https://www.wix.com/corvid/forum/community-discussion/prefill-textbox-using-wixcode
You can also find a lot of posts on this matter if you browse the forum:
https://www.wix.com/corvid/forum/search/prefill
https://www.wix.com/corvid/forum/search/auto-fill
Good luck!