The first thing to try is an alternate Internet connection. The easiest thing to try is a phone hotspot. For some users, this has allowed completing setup and then had no issues connecting to their home network.
But it's always possible that the device is defective. I had an Insignia Roku TV that was stuck on the update in a constant loop. I returned it to Best Buy and picked up another, and it's worked fine for close to 7 years. Sometimes electronic devices simply fail for no known reason.
Roku Community Streaming Expert
Help others find this answer and click "Accept as Solution." If you appreciate my answer, maybe give me a Kudo.