Basic Current mirror using BJTS
Label the left-most transistor Q1 and the right-most Q2.

At the Q1 collector node, write a KCL equation (assume identical transistors):

$$I_{ref} = I_{C1} + I_{B1} + I_{B2} = I_{C1}\left(1 + \frac{2}{\beta}\right)$$

Thus

$$I_{C1} = \frac{I_{ref}}{1 + \frac{2}{\beta}}$$

and it follows that

$$I_{B2} =  I_{B1} = \frac{I_{ref}}{\beta + 2}$$

thus (ignoring the Early effect)

$$I_{C2} = \beta I_{B2} = I_{ref}\frac{\beta}{\beta + 2}$$

It's straightforward from here to include the Early effect and then see why, e.g., the Wilson current mirror is superior