My advice when you have a younger sibling with low self confidence:
Always reward and praise effort not results (and encourage family members to do the same)
Encourage choosing different subjects where possible so less chance of direct comparison.
Help them decide a goal/future plan so they have their own target, that's nothing to do with their sibling.
For DD2 this was the most powerful - she found a subject that fascinates her and has plotted out her education and career path around it - so her goals have become about her own future and not matching or beating her sister.
DD1 got 11 A* s 2 years ago. DD2 had suffered a lot of anxiety about living up to her but eventually realised it doesn't matter and she was genuinely over the moon with her results, as are we.
(I think for us, the change from letter to number grades was actually helpful as it means direct comparisons are less likely
)