Risolto
Codice PHP:
<select> <?php
            $valore 
2;
            
$sql "SELECT * FROM marca";
            
$resalt mysqli_query($conn$sql);
            while(
$row mysqli_fetch_array($resalt)){
            
$selected=($row["Id_marca"] == $valore) ? 'selected' '';
?>
    <option value=" <?php echo $row["Id_marca"] .'"'$selected ?>  "> <?php echo $row["marca"?> </option>
<?php ?>
            </select>
O trovato la risposta per metà su u libro e l'altra metà in uno stript su github