What's the best way to STORE homemade baby food?

Am

What do y'all use? Are these good options? Or should I just reuse the glass jars of the baby food we've already eaten? Ice cube trays seem like a good option but they don't come with lids so IDK. Also, how long do you store it before it goes bad by refrigerator vs freezer?