2004 Hyundai Getz no longer has any gears and makes a rattling noise when idling. It’s a manual gearbox.
It sounds like the transmission has broken something internally. It could be that the clutch assembly is smashed, or the input or output shafts have snapped. It could even be the actual gearsets that have failed, leaving you with no mechanical connection between the engine and the gearbox.
Either way, it sounds like it needs a new clutch and/or gearbox which may be more than the market value of the car. That said, wrecking yards are full of Hyundai Getzes, so a second-hand, tested transmission might save the day.