Face ID works with glasses and facemasks. You can find the option to add glasses under Face ID with a Mask on the Face ID & Passcode setting. This is an exclusive feature for newer devices (iPhone 12 and up) running on iOS 15.4 and up.