If I understand your code correctly, you'll need some sort of persistent storage to store all the previous submission in the listing. A database would be ideal for long term storage. Session would be the minimal requirement:
<?php
session_start();
if (!isset($_SESSION['past_submission']) || !is_array($_SESSION['past_submission'])) {
$_SESSION['past_submission'] = [];
}
if (!empty($_POST) && isset($_POST['boodschappen']) && !empty(trim($_POST['boodschappen']))) {
array_push($_SESSION['past_submission'], $_POST['boodschappen']);
}
$past_submission = $_SESSION['past_submission'];
?>
<html>
<body>
<form action="" method="post">
<input type="text" name="boodschappen"><br><br>
<input type="button" value="Verstuur">
</form>
<ul>
<?php
$boodschappen = ["aardappelen","aardbeien","3 pakken melk","yoghurt"];
array_push($boodschappen, ...$past_submission);
foreach ($boodschappen as $boodschap) {
echo "<li>".$boodschap."</li>";
}
?>
</ul>
</body>
</html>
Please note that Session only works for the visitor session alone. The data is not available to other visitors or you.
As described before, you'd probably need a MariaDB / MySQL / PostgreSQL to store the submissions for long term. You'd probably need to use PDO to insert data into, or retrieve data from database.