In my opinion you should try something like that:
- First merge by distance as it seems like you have overlapping vertices
- You need to divide your sides like that in order to be able to fold them:
- Then lower down the chain of bones in order to put the rotation axis at the bottom, and create 3 bones that you make children of the bottom bone in order to control the top vertices and make the fold fold:
- Frame 0:
- Frame 80: