an authentication app like google authenticator. there are others as well. https://en.wikipedia.org/wiki/Comparison_of_OTP_applications
No communication occurs to serve your 2fa code - it's a time based 2fa protocol.