To make sure everything is abundantly clear here:
The CR1/IR1 page in your passport is a valid VISA (even before stamped), it is your legal status for being able to enter the US (not as a visitor, not with your ESTA, not with anything else). If anyone asks for your visa number or have to fill it out on the form, that IR1/CR1 visa page and number is what you need to provide
You are not a LPR/resident until you have entered the US for the first time with your IR1/CR1 visa, so especially if you are traveling alone the default line should be the "foreigner" line, because you are not a LPR yet. Now if you are traveling with your US citizen spouse, you can ask the workers and they may direct you to the US citizen/resident line (this has happened to us and my non-citizen wife, even when she was traveling with her B2 visa), but if any doubts just use the foreigner line.
Now, once you enter for the first time with your CR1/IR1 and get your temporary I-551 stamp, you are now a LPR! If you travel again before you get your physical green card, you can use your IR1/CR1 visa with the stamp, and use the resident line during immigration. And it is still your visa, and you can use that number for any forms or questions until you get your physical green card -- though if there is ever an option to select "resident" you can now select it.
Hopefully that is clear for everyone, @pushbrk feel free to correct if I missed something.