Hello!
If you are trying to access your two factor authentication with FB Apple will not be able to assist with that as they are a third party company. You can check out the link below to get support with any FB issues you may be having.
Facebook Help: https://www.facebook.com/help/
Facebook Two Factor Authentication: https://www.facebook.com/help/148233965247823/
If you are having issues with Apple's two factor authentication you can find a link with more details that might help below. Typically Apple's two factor authentication is based on your devices that are connected to your Apple ID and not your phone number.
Two-factor authentication for Apple ID: https://support.apple.com/en-us/HT204915
Let me know if this helps!