if by d size you mean those thicc boi torch cells used in torches, then pls post that here too certainly they are no longer manufactured of if manufactured then at low rate s.t. They are not available
D size we use are zinc carbon batteries, their voltage is 1.5V and mostly used in series combination so 3v total.
*en.wikipedia.org/wiki/D_battery
but li-ion batteries have 3.7v
similar size li-ion battery is 32600 but some says 26650. (height is important and not the diameter (60-65mm))
*en.wikipedia.org/wiki/List_of_battery_sizes#Cylindrical_lithium-ion_rechargeable_battery
so you need single battery (3.7v) + 1N4007 diode (0.6-0.7v drop) = ~3 to 3.1V
1n4007 diode is for voltage drop, and gives ~0.6V voltage drop
*microcontrollerslab.com/1n4007-diode-pinout-features-explained-with-example-circuits/
1N4007 costs around ₹2-₹5
(similarly you can replace any battery operated thing with wired mobile charger of 5V/9V/12v output and adding 1N4007 diode in series)
or
simple use 2 battery in parallel position (same direction)
using battery holder/adapter
Use single battery (li-ion or any rechargable or any local) + old discharged cell or dummy cell or empty cylindrical with wire inside (for circuit completion and continuous flow)
using battery holder/adapter converter
Also there are some AA to D cell, AAA to D cell and AA to AAA adapter
but you will have to do more frequent charging.
*www.amazon.in/dp/B098L2BP97/
*www.amazon.in/dp/B08HPB42ZV/
*www.amazon.in/dp/B08HQ96957/
*www.banggood.in/Battery-Adapter-Converter-Adapter-Case-For-2xAA-To-D-Size-p-921289.html
*www.banggood.in/AAA-To-AA-Battery-Adapter-Converter-Case-p-1087839.html
similarly any combination is possible
18650 to 26650
*www.aliexpress.com/item/1005002634261598.html
*www.aliexpress.com/item/32787194711.html
From these batteries affordable and long life option is yet to decide and it also depends on the battery used for.
*en.wikipedia.org/wiki/Electric_battery#Chemistry
Nowadays those mosquito racket comes with AAA rechargeable battery. if racket gets broke then these can be utilized for other purpose.