Create a Custom Signup Form

Question:
How can I create a signup form that has custom fields?

Product:
[Which editor or feature is your question most relevant to? e.g. Wix Editor, Wix Studio Editor, Editor X.]
Wix Studio Editor/IDE

What are you trying to achieve:
[Explain the details of what you are trying to achieve. The more details you provide, the easier it is to understand what you need.]
I am trying to create a custom signup form that captures details like “Company Name,” for starters. This is proving difficult. I am using custom JS code, frontend and backend, but I am new to JS code in general, as well as Wix’s infrastructure.

What have you already tried:
[Share resources, forum topics, articles, or tutorials you’ve already used to try and answer your question.]
I have communicated with Wix Support, and maybe they’re giving me the solution and I just don’t understand: here’s the articles they referred me to:
items
queryExtendedfields()
register
Custom Signup

Additional information:
[Include any other pertinent details or information that might be helpful for people to know when trying to answer your question.]
Anyway, just want to get to the bottom of this. Been stuck for about a month. Every time I run the below code:

import { contacts } from 'wix-crm-backend';

export function getQueryResultItems() {
  return contacts.queryExtendedFields()
    .limit(10)
    .find()
    .then((results) => {
      if (results.items.length > 0) {
        return results.items;
      } else {
        console.log("No items found");
      }
    })
    .catch((error) => {
      console.error(error);
    });
}

I get an error of: “SyntaxError: Cannot use import statement outside a module” and some other various disturbing things in the Debug console. A fix would be appreciated.