Is the least and most efficient amount of work done by a gas by free expansion into vacuum and an isothermal expansion respectively? Basically the title. Is the least and most efficient amount of work done by a gas by free expansion into vaccuum and an isothermal expansion respectively?
For an isothermal expansion we get:
$$ W = nRT \ln \frac{V_f}{V_i}$$
Is this true? An adiabetic expansion has less area under the curve, so my guess would be it produces less work.
How is this related to entropy?
Adding heat $Q$ and transforming it into work $W$ gives for the first law:
$$ dU = dQ  + dW =0$$
$$ dQ=dW$$
Where I define efficiency as:
$$ e = \frac{\text{useful energy gained}}{\text{energy lost}}=\frac{W}{Q}$$
 A: To begin with, I am having difficulty seeing the connections between the title of your post and the text of your post. Nevertheless, I will attempt to answer your specific questions.

For an isothermal expansion we get:
$$ W = nRT \ln \frac{V_f}{V_i}$$
Is this true?

It is true only for a reversible isothermal expansion of an ideal gas where $W$ is reversible work.

An adiabatic expansion has less area under the curve, so my guess
would be it produces less work.
How is this related to entropy?

If you were comparing a reversible isothermal expansion to a reversible adiabatic expansion with the same final volume, then yes, the reversible adiabatic work is less. But no work is done in the free expansion since the expansion is against a vacuum (zero pressure).
As far as entropy is concerned, for the reversible isothermal expansion entropy is transferred to the system from the surroundings in the form of heat and equals $Q/T$ where $Q$ is the heat added and $T$ is the constant temperature of the gas. Since for the isothermal expansion $W=Q$ then,
$$\Delta S=\frac{Q}{T}=\frac{W}{T}=nR\ln\frac{V_{f}}{V_i}$$
A process that is both reversible and adiabatic is isentropic (constant entropy). Thus $\Delta S=0$. But your free expansion is not reversible so entropy is generated. It turns out the entropy generated for the free adiabatic expansion of an ideal gas will be the same as the increase in entropy for the isothermal expansion path between the initial and final states.

Adding heat $Q$ and transforming it into work $W$ gives for the first
law:  $$ dU = dQ  + dW =0$$ $$ dQ=dW$$

I think you meant $dQ=-dW$. Then it is true for the reversible isothermal process where, for your version of the first law, $W$ is negative if work is done by the system. (BTW, you should use $\delta$ for $W$ and $Q$, not $d$ since work and heat are not exact differentials because they depend on the path).

Where I define efficiency as:
$$ e = \frac{\text{useful energy gained}}{\text{energy
lost}}=\frac{W}{Q}$$

The right side of the equation denotes the thermal efficiency of a heat engine, i.e., an engine that takes in heat and produces work. As such the numerator should read "net work done" and the denominator read "gross heat added".
In that regard the thermal efficiency of the reversible isothermal expansion process (not to be confused with the efficiency of a cycle)  is 1 since all the heat added produces work.
For the free expansion $W=0$ and $Q=0$, thus making  $\epsilon$ mathematically undefined. In any event, thermal efficiency is not applicable to adiabatic expansion work since it does not use heat to produce work. It uses its internal energy to perform work.
Hope this helps.
