To add a bit more detail, both AVIF and HEIF use the same file/container format: ISO Base Media File Format¹ — a.k.a. "ISOBMFF", ISO/IEC 14496-12.
ISOBMFF is also used for MPEG-4, AV1, etc. If nothing else, the world appears to have settled on a flexible, extensible container format that can support any future media formats we can come up with.