Why is the result a transparent PNG?
Because a circle inside a square file has to leave the corners as nothing at all. If they were filled with white the image would only look round on a white page, and would show four bright triangles anywhere else. PNG stores an alpha channel, so the corners are genuinely empty; JPEG has no alpha channel and cannot hold that. For apps that render transparency as black, there is also an option to fill the corners with a solid colour instead.
I uploaded it somewhere and the corners turned white or black. What happened?
That site re-encoded your file: usually to JPEG, which has no way to store transparency, so the empty corners were flattened to a solid colour. Nothing is wrong with the PNG itself; check whether the destination accepts PNG, or accept the flattening if the platform masks the avatar into a circle anyway.
What size should I export for a WhatsApp or Discord profile picture?
Both apply their own circular mask to a square upload, so the size matters more than the shape. A square export of roughly 512 px is a comfortable answer for either: apps display avatars far smaller than that but request a higher-resolution copy on sharp screens. A 96 px crop looks soft the moment anything shows it larger, and there is no benefit to a 4000 px avatar beyond a bigger upload.
Is my image uploaded anywhere?
No. The image is decoded and the circle is masked on a canvas in your browser, so the photo never leaves your device and there is nothing stored on a server.