Just as RedDevil said, in your script you’re using the same variable for every level, so let’s say the player finished the first level, once he starts the second the value of the coins will begin with that of the first level instead of 0. You can fix this in two ways:
For each level have a coin variable ex: coinLVL1, coinLVL2…
Once the next level starts return the coin variable to 0. You can then save the score of each in an array of ints or floats in order to display them.
For example
public int coins;
public int nb = 0;
public int coinScore[nb];
public bool isFinished = false;