This seems to happen a lot. The first thing to try is to reboot everything or remove the power for a minute and plug everything back in - your modem/router and Roku. If it still fails, a lot of people have had success getting through the setup process by using their phones as a hotspot. Once it gets through the setup you can then switch to using your Wi-Fi.
Roku Community Streaming Expert
Help others find this answer and click "Accept as Solution."
If you appreciate my answer, maybe give me a Kudo.
I am not a Roku employee.