PHP : Why did a multidimensionnal array disappear of $_SESSION between two pages?

I do a quiz why takes 10 questions in a database and print them with html one by one after checking if responses are trues or falses. These questions are stored in a $_SESSION[‘questions’] as a multidimensionnal array.
My problem is between two pages, the one wich print the questions and responses, and the other which check if the response is true or false. This page upgrade a $_SESSION[‘count’] by 1 to print the next question and if it’s true, the $_SESSION[‘score’] is upgraded by one.
When the program return on the quizEcho.php score and count are well upgraded, but my array in $_SESSION[‘questions’] disappear. Is someone know why ?

quizEcho.php :

<?php session_start()?>
<!DOCTYPE html>
<html lang='fr'>
<head>
    <meta charset="UTF-8">
    <meta http-equiv="X-UA-Compatible" content="IE=edge">
    <meta name="viewport" content="width=device-width, initial-scale=1.0">
    <title>Quiz <?=$_SESSION['theme']?></title>
</head>
<body>


    <?php
        echo"<br> before if :";
        var_dump(isset($_SESSION['questions']));

    if (!isset($_SESSION['questions'])){
        require_once('./traitements/connexionToDB.php');

        $query = $db->prepare(" SELECT * FROM questions 
                                WHERE theme = :theme
                                ORDER BY RAND()
                                LIMIT 10");
        $query -> execute(['theme' => $_SESSION['theme']]);
        $_SESSION['questions'] = $query->fetchAll();
    }

    $questionNumberView = $_SESSION['count'] + 1;

    echo"<br> after if :";
    var_dump(isset($_SESSION['questions']));


    if ($_SESSION['count'] < 10){
        echo "
        <h2>{$_SESSION['questions'][$_SESSION['count']]['question']}</h2>
        <form action='./traitements/answerToScore.php' method='get'>
            <input type='hidden' name='answer' value='a1'>
            <input type='hidden' name='id' value='{$_SESSION['questions'][$_SESSION['count']]['id']}'>
            <input type='submit' value='{$_SESSION['questions'][$_SESSION['count']]['a1']}'>
        </form>
        <form action='./traitements/answerToScore.php' method='get'>
            <input type='hidden' name='answer' value='a2'>
            <input type='hidden' name='id' value='{$_SESSION['questions'][$_SESSION['count']]['id']}'>
            <input type='submit' value='{$_SESSION['questions'][$_SESSION['count']]['a2']}'>
        </form>
        <form action='./traitements/answerToScore.php' method='get'>
            <input type='hidden' name='answer' value='a3'>
            <input type='hidden' name='id' value='{$_SESSION['questions'][$_SESSION['count']]['id']}'>
            <input type='submit' value='{$_SESSION['questions'][$_SESSION['count']]['a3']}'>
        </form>
        <form action='./traitements/answerToScore.php' method='get'>
            <input type='hidden' name='answer' value='a4'>
            <input type='hidden' name='id' value='{$_SESSION['questions'][$_SESSION['count']]['id']}'>
            <input type='submit' value='{$_SESSION['questions'][$_SESSION['count']]['a4']}'>
        </form>
        <div id='questionNumberView'>
        Question {$questionNumberView}/10;
        </div>
        <div id='scoreView'>
        Score = {$_SESSION['score']};
        </div>
        ";
    } else {
        echo"Bravo, vous avez obtenu {$_SESSION['score']} points !";
        echo"<a href='./index.php'>Retour à l'accueil</a>";
    };
    

    ?>

    
    
</body>
</html>

answerToScore.php :

<?php
session_start();

require_once('../traitements/connexionToDB.php');
$query = $db->prepare(" SELECT * FROM questions 
                        WHERE id = :id");
$query -> execute(['id' => $_GET['id']]);
$response = $query -> fetch();

if ($response[$_GET['answer']] == $response['true_answer']){
    $_SESSION['score']+=10;
    $_SESSION['count']++;
} else {
    $_SESSION['count']++;
}

session_write_close();
header('Location: ../quizEcho.php');
exit();

After reading some forums I tried to append “session_write_close()” before the header redirection but unsuccessfull.. Is anyone see something I can’t see? Or is it impossible to store an array in a $_SESSION ? What’s the solution?