Use a high-quality USB cable (preferably the original one) to ensure the connection doesn't drop during flashing.

A stock ROM file for the Nokia G21, typically in .pac format.