Turn the volume up to hear the A/C compressor at work
However in this case there is nothing to worry about. The loud noise you hear when you park the car or when you plug in to charge is just the air conditioning compressor running. The car's thermal management system is working to cool off the batteries. Keeping the batteries cool is vital to prolonging their life, and preventing early capacity loss. Some early Nissan LEAF owners who lived in warm weather climates experienced unacceptable battery capacity loss and actually sued Nissan over it. The LEAF uses a passive thermal management system which doesn't actively cool the batteries like most modern EVs do, and in extreme cases the batteries were damaged from the heat. There are different types of systems used in today's EVs, and the i3's is likely the best one out there. The thermal management system is just another reason the i3 has been called the most advanced vehicle on the planet.
The i3 has a sophisticated thermal management system which uses R134a refrigerant to cool the batteries. It's actually the only EV to employ this type of battery cooling method. Some electric vehicles from other manufacturers use fans to blow air across the batteries to cool them, while other more advanced systems use a liquid based thermal management system. Liquid based systems work well, but they use more energy than the i3's system does, and using an inert gas is also the safest way to cool the battery. If the i3's battery pack is somehow compromised, the gas will simply and harmlessly dissipate. One potential problem of liquid based thermal management systems is in the rare case of a catastrophic rupture of the battery pack, the liquid could act as an accelerant if the battery has a fire, spreading the fire to other parts of the pack. I don't see this as a serious flaw in liquid based thermal management systems, and I'd feel perfectly safe driving or owning an EV which had one. It's just that I believe the i3's TMS is simply better than the competition's.
So if you're an i3 owner and are wondering why the car has been making this loud buzzing noise recently, now you know.