I've posted links to the many advantages Ukraine has, the most fundamental being the shift in perspective to western military culture and responsibility for taking objectives distributed to those doing the job. The valuing of human life and unit cohesion when soldiers care for one another. This is reflected in the tactics used, they don't use unsupported human wave meat attacks with blocking troops at their backs. In terms to casualty ratios, it makes all the difference, as does medical care to avoid most of them being KIA.
I have reasons for the numbers, but earlier in the war when the Russians had lots of artillery and got their shit together somewhat it was different in the early days of Bakhmut, then the dug in Ukrainians took lots of hits. However, since the Russian ran out of shells and are now using junk equipment that is afraid to come near the front, their unsupported meat attacks are mowed down by artillery, mortars, drones and machine guns.
These are the reasons for my personal estimates, since there is not much published on Ukrainian loses, but the Russian dead are easier to count, often using public records in Russia and on the battlefield, since they tend to leave their dead and wounded.