Trying to make a circuit for a 3D printed lamp
9V alkaline batteries are really only best for a select number of extremely low current applications.  They were more useful before efficient voltage converters became ubiquitous and cheap.  Because they are a niche market and 6 small cells crammed into a double casing, you pay a lot for what you get. In addition, you only need 3.2V for your LED.
If you want to use alkaline batteries, 1.5V AAs would be better.
You can use 3 AAs to get 4.5V and use a series resistor to limit current to your LEDs.
How big of a resistor?  Well 4.5V - 3.2V is 1.3V left over that has to be dropped by the resistor.  If the resistor is passing 20 mA,
E = IR so R =E / I = 1.3V / 0.02A = 65 Ohms
P = EI = 1.3V * 0.02A = 26 mW minimum
If the resistor is passing 40 mA
E = IR so R = E / I = 1.3 V / 0.04 A = 32.5 Ohms
P = EI = 1.3 V * 0.04 A = 52 mW minimum
If battery life and consistency of brightness matter a lot, you can use a switching voltage converter to maintain a constant voltage to the LED and resistor, or use a constant current driver and get rid of the resistor for best efficiency.