Does a moving charge create a magnetic field or does a changing electric field create magnetic field or are they same?

Full question

Does a moving charge create a magnetic field or does a changing electric field create magnetic field or are they same? and a moving charge always creates a changing electric field?

Here is a thought experiment to show what I mean :

Imagine a conductor thats an infinite line of charge on a Z-axis in some imaginary space . and the current is always flowing ( constant current , $$dI=0$$ )

We place two device ( lets name it $$A$$ and $$B$$ ) at the same point in space ( its not possible , but imagine it is ) , These two devices can independently measure the electric field and magnetic field respectively .

Okay , lets go to $$t=0$$ ( we are not stopping anything , the electrons were still flowing at $$t=-0.00001$$ , you can say we are taking the readings at that time , not stopping anything ) , we take the values of the readings of the two devices

Lets suppose the values are

• $$E_1$$
• $$B_1$$

Now we take the readings at some other time $$t$$

Lets suppose those values are

• $$E_2$$
• $$B_2$$

Heres the problem now : Due to constant inflow and outflow , we can say that at any point in time , there is always a set amount of electrons in every point ( eg (0,0,5) ) , hence the electric field remains same always

Now since electric field always remains the same ( $$E_1=E_2$$ ) , but there being movement of electrons , will there be Magnetic field ( will $$B_1 >0$$ or $$B_2>0$$ )? and the answer to that is YES ! Because our book tells us that a current carrying conductor has some magnetic field . So the question is : Why ? Even when Electric Field is not changing? Does magnetic field only depend on movement of electrons and not change of electric field at a certain point ?

Now obviously there are many shortcomings in this question and it will probably be very wrong in the concept somewhere.

As one of my friends pointed out , that electrons dont just teleport , they need time to move ( albeit very short time ) , his theory is that , in the time that the electrons move , electric field changes but then again comes back to the same value . Hence he says that electric field is changing , therefore there is a magnetic field .

Also , I assumed that electrons move in a straight line , which may or maynot be true ?

Firstly, your friend is technically correct, but for these kinds of things modelling the charge distribution as continuous is an exceedingly good approximation (1 Amp for example is 1 Coulomb per second, which corresponds to ~10$$^{19}$$(!) electrons passing through a given cross section every second), so that's what is done.
So we are forced to conclude that the magnetic field is due to the current itself, i.e. the movement of the charges, not any change in the electric field. This is why Ampère's law takes the form $$\nabla \times \mathbf{B} = \mu_0\left(\mathbf{J} + \varepsilon_0 \frac{\partial \mathbf{E}} {\partial t} \right)$$ Notice it includes both the current density $$\mathbf{J}$$ as well as the change in the electric field. You can view this as a necessary consequence of special relativity, namely length contraction changing the charge density. There are plenty of explanations for this on this site as well as other places, such as the great Veritasium video linked in the comments.

Magnetic fields are a relativistic effect caused by moving charged particles. Performing a Lorentz-Transformation on the 4-Vector-Potential of a moving particle, will give you the the 3-Vector-Potential component of it.

The transformation would look like this: (if I got the covariant/contravariant part wrong, please do comment on it)

$$\phi'^{\mu} = (\phi'_r/c, \vec{0})$$

$$\phi^{\mu} = L^{-1} \phi'^{\mu}$$

$$\phi^\mu = (\phi_r/c, \vec{A})$$

With A being the 3-Vector-Potential.

Then you have it

$$\vec{H} = \vec{\nabla} \times A$$

I would say that E and B are not separate entities, but elements of the field strength tensor, F, which is the exterior derivative of the four-vector potential A. F is antisymmetric second-rank, so in 4D it has 6 components, 3 of which we call E and the other 3 we call B. A Lorentz transformation acts on F by matrix multiplication, which mixes E and B differently for different observers. The differential geometric language is so concise that when we define F = dA, two of Maxwell's equations are d*F = *J, and the other two are dF = 0 (which is an identity since dd = 0).