This question is a very basic one, We are told that that current is produced because of flow of electrons but it is stated that the flow of current is opposite to the direction of the flow of electrons if the electrons are the body which moves which further produces current then how can current move to the opposite direction (is current is basically flow of electrons)
3 Answers
Because by convention electrons have negative charge. The definitions were made long time ago, assuming that the current is carried by positively charged particles. Indeed, Maxwell equations date back to 1861-62, whereas the discovery of electron is by J.J. Thomson happened in 1897.

- 58,522
Current is the rate of flow of charge through a surface (often an imaginary surface). If positive charge is passing through the surface from side A to side B, we say that there is a current in the direction AB. This definition or convention enables us to write, without any minus sign, $$I_{AB}=\frac{\Delta Q_{AB}}{\Delta t}$$ In this equation we count a negative charge passing through from B to A as an equal positive charge going from A to B ! This makes sense because in several ways (for example the motor effect force on a conductor in a magnetic field) a flow of positive charge in one direction is indistinguishable from an equal rate of flow of negative charge in the opposite direction.
For students it is a (short-lived?) nuisance that in metals, the conductors most often encountered, the current is carried by electrons, which are negative, so the current is in the opposite direction to the electron flow. The nuisance arises not because of an ill-chosen convention linking current and charge flow; the convention is the natural one (see first paragraph). Rather the nuisance arises from the arbitrary way in which the positive and negative labels were assigned, nearly 300 years ago. Glass rubbed with silk was said to acquire a positive charge, and amber rubbed with fur, a negative charge. After that assignment was made, whenever charge appeared in an experiment it could always be classified as positive or negative, ultimately by reference to charged glass or amber! Unluckily, when the electron was discovered in the 1890s, it turned out to have a negative charge.

- 35,641
The NCEE FE (Fundamentals Exam) handbook for Electrical and Computer Engineering defines current as follows:
Electric current $i(t)$ through a surface is defined as the rate of charge transport through that surface
Note the definition says "charge". It does not say negative charge or positive charge, but simply charge. As has been previously noted that charge can be the flow of electrons (negative charge), the flow of positive ions (positive charge), or both, depending on the nature of the conduction medium involved.
In electrical engineering so called "conventional current" is defined as the flow of positive charge. It has been suggested that this convention has an historical basis in the early work of Benjamin Franklin's with static electricity. See here for more background. https://pwg.gsfc.nasa.gov/Education/woppos.html
Hope this helps.

- 71,527