The pointer to aux was created but not initialized, containing any value at the start of the loop. It is likely that your program is closing when it tries to access the pointer, interrupting it by segmentation failure.
You must load the data to be written to the aux pointer before you start recording.
To load the data into aux, you need to call some function that returns this data, for example:
pizzas *aux = getPizzas();
This program probably already has this data. So the correct would be to receive the data as a parameter of the function:
void Criar_Ficheiro_Pizza(pizzas *aux)
Search the program for the text "pizzas" because you will be able to find points at which this data is generated.