If it’s DC, the easiest way is to use a shunt resistor and measure the voltage across it, and for AC you could use a current transformer ... shunts and CT’s – accuracy, linearity, low ...