How to get a value from a database based on a value from the same row, but different column - pls help!!!!!!!!!!

In your description, you indicated your table was called ‘Teachers’. If your table is another name, just go into the backend code and change the table name from ‘Teachers’ to the actual name of the table.

The line in the backend code:

return await wixData.query("Teachers")

must be changed to the name of the actual table, if it is not ‘Teachers’.
Also, double check the name of the column (field) of the table to ensure that the field name is correct. See my note earlier to verify the ‘Field Key’ is being used for your field name.

url = results.items[0].link-teachers-title;

I have an issue in that I can’t run the code I gave you because I don’t have your tables.
The second issue you stated is that the error indicates that you can only use an await within an async function.

I wonder if it is being caused by the .then( () => } line.

wixUsers.login(userEmail,password)
.then( () => {

Try and put an async in front of the () and let me know if that solved the problem.
Eg: .then( async () => {