How to await Firebase admin.auth().getUser() function

I have a function that is supposed to return a user’s email from using the Firebase admin API getUser(uid) function,

function getEmail(uid){
  var email;
  admin.auth().getUser(uid)
    .then((userRecord) => {
       return userRecord.email;
    })
    .catch((error) => {
      console.log('Error fetching user data:', error);
    });
}

But in my other function when I make a variable that calls the function,

email = getEmail(uid);

the value in email is undefined, because the getUser function has returned a promise. How do I make the function getEmail wait to get the value of userRecord before returning?

I’ve tried adding await statements in different parts of the function but I’m not sure how to do it correctly. I’m a beginner in using the Google API.