■ How to change the length of Array

Push | Pop push(): constant gas costs cuz storage is zero-initialized [1,2, ]   ⤴︎

pop(): dynamic gas cost because it depends on the “size” of the element

[1,2,3] ⤵︎ push and pop is the only way to change the length of an array

https://docs.soliditylang.org/en/v0.8.13/types.html?highlight=pop#array-members

Types - Solidity 0.8.13 documentation