What's the best way to control DC current in a circuit from 1mA-20mA at 15-30V input with a microcontroller?
Google for "Howland current pump":
https://www.allaboutcircuits.com/technical-articles/the-howland-current-pump/

It's a lovely op-amp circuit that turns a voltage (from your MCU DAC) into a single-ended current. You can use a "power op-amp" to implement it:
https://www.st.com/en/amplifiers-and-comparators/power-operational-amplifiers.html