How do I refer to dynamic range in google sheet?

Here is my sheet:

     A       B            C
1    ID      VALUE        MY VAL
2    1        500         = AVERAGE(B2:B2)
3    2        400         = AVERAGE(B2:B3)
4    3        550         = AVERAGE(B2:B4)
5    4        700         = AVERAGE(B2:B5)
6    5       1200         = AVERAGE(B2:B6)

…….

This is a very long sheet so I can’t input the AVERAGE(B2:Bx) manually. Is there any good ideas to solve this?