If you're off of battery power or USB power instead, you'll need to build a current-sense circuit. Analog wise, its very simple: a small 0.01 ohm resistor (called a "current sense resistor") is placed in series, and you measure the voltage drop across it. 0.0001 V across a 0.01 ohm resistor -> V / R -> 0.0001 / 0.01 == .01 Amps == 10 mA being drawn.
Now the question is "how do I measure 0.0001V accurately" ?? And that's a trivial op-amp problem. So trivial, that people sell cheap chips that already do this for you, called current-sensing amplifiers. They just multiply the voltage by 200 accurately. (so 0.0001V into the amplifier comes out as 0.02V), and 0.02V can be measured by pretty much anything.
https://www.digikey.com/en/products/detail/ohmite/MCS1632R01...
https://www.digikey.com/en/products/detail/onsemi/NCS199A3RS...
Voltage-multipliers though are a trivially easy OpAmp circuit, and I'd recommend that beginners actually try to build their own current-sense amplifiers from scratch. Its good to learn how to use OpAmps, and learn all the issues (ex: Rail to Rail, positive / negative voltages, etc. etc.). I'd recommend you do a 9V project with the LM358.
Staying in the analog world alone, you can output the voltage into a 555 Timer, and then have it flash an LED every time the capacitor filled up (and the discharge would also dump the capacitor). For example.
Or you could just wire it up to a microcontroller and busy-loop ADC-convert the input. So you can perform the "integral / summation" in microcontroller / in C-code rather than circuit magic.
The important tidbit is that we've turned 10mA current into a value we can "touch" and use. Hell, maybe the easiest solution is to just hook up a wire somewhere and shove an oscilloscope there to finish things off, depending on how lazy you wanna get.
-------
I know one professional chip did Opamp Integral -> Comparator (if integral is full, dump the charge to ground. If +V, do register++. If integral was full of negative voltage, do register--).
Then, whenever the register overflowed, it'd generate an interrupt edge on its output (for both overflow or underflow). Alas, I forgot which chip did this. But this way, you could build all your stuff out of 100kOhm resistors, 10nF capacitors, tiny digital logic circuits with micro-amps of power usage that wakes up your microcontroller out of sleep for just a "Current_Reading++" statement on overflow and you go back to sleep. (or current_reading-- on underflow)
But that's all advanced stuff that probably doesn't matter for a student making their first practical OpAmp circuit :-)
If you want higher time resolution, there are several fully integrated hall effect current measurement ICs out there, like for example the ACS723.
If you need even better accuracy or resolution and you can spare 100 bucks, just buy one of the Nordic Power Profiler Kits.
There are special resistors for this purpose that are very low in resistance.
The data acquisition is kinda a bitch if you want to measure accurately over long time, small IoT device can take microamps when idle and tens of even hundred+ mA when transmitting and that's 4-5 orders of magnitude of dynamic range and that's kinda hard to deal with accuracy
https://www.joulescope.com/ handles most of that edgecases but it's a pricy piece of kit if you just want to do some measurements and are not using it to make actual product.
Hell, that's actually very easy way to make ADC, just start counting, charge cap to pre-determined value then trigger counter stop. There are few improvements to that technique (like dual slope ADC, where you use reference voltage to discharge the cap to get the ratio between reference and input signal) but in general it can be very accurate way to measure.
Like others mentioned it is a about measuring voltage*current.
I found this video for low power DC measurements helpful as well https://www.youtube.com/watch?v=LUB8RWzzLWc&t=15s or for AC Power Meter https://www.youtube.com/watch?v=QXNlsawaYEg&t=868s
Then we repeat it using resistors instead, until we match the discharge rate exactly.
Then measure the resistor and do I=V/R, using the midpoint V. That accounts for all the surges and eliminates most error sources, giving you a nice and extremely realistic average current draw.
Most of the time you care about the current only. Now if you actually want power over time, that is energy. in that case you would need some logging, and sampling