Why current is a scalar quantity but current density a vector quantity?

Current represents the direction of the flow of charged carrier in the conductor and is considered as a scalar quantity.

Current density is a vector quantity because it is defined as having magnitude equal to current through a very small unit area, the area being normal to the direction of flow of current and the direction along the direction of current.

That is, it is the product of the charge density and velocity for any location in space.