Is it possible to use a Google Voice Number for Apple Two Factor Authentication
Unlocking your computer when using 2-factor authentication for iCloud does not require being able to receive a text message at all.
When you enable 2-factor authentication for the very first time, you'll be asked to enter a phone number where you receive a confirmation code via either text or voice (your choice).
Now in the future when you want to login to for example www.icloud.com, the 2-factor code will popup on your computer automatically. It will not require receiving a text message or voice call.
This works using a similar technique as app based authenticators like the Google Authenticator app and the Microsoft Authenticator app, namely that a secret is stored on your device and that enables you to generate 2-factor codes on this particular device. It does not however follow the TOTP standard like those two authenticator apps.
Only when that secret is lost (for example by wiping your hard drive), and you haven't got access to any other device that can generate the 2-factor code for you - you'll need to request a new confirmation code by text or voice.
If you want to guard against that (rare) situation, you can definitely use a Google Voice number to receive the voice delivered code.