I’m trying to create a clicker game [closed]

I’m trying to create a clicker game website with an image of an apple as the button. I’m not trying to get my website posted online though. I’m trying to bring the apple to the center but it’s not working. Also, I’m trying replace the header element with ‘You win!’ When you reach a score of ten, but that’s not working either. Based on the code below, does anybody have any suggestions or ideas?
I’m kind of new to Web Development as you can see.

var number = 0;

function add1() {
  number += 1;
  document.getElementById("counter").innerHTML = number;
}
// add1 function to add one and then output the result

if (number == 10) {
  document.getElementById("heading").innerHTML = "You win!";
} else if (number == 5) {
  document.getElementById("heading").innerHTML = "You're almost there!";
} else if (number == 7) {
  document.getElementById("heading").innerHTML = "You're nearly there!";
} else {
  document.getElementById("heading").innerHTML = "Keep going!";
}
body {
  background-color: rgb(255, 169, 0);
}

h1,
p {
  text-align: center;
}

button {
  align-self: center;
  background-color: rgb(240, 248, 255);
}

img {
  display: flex;
  align-items: center;
  justify-content: center;
}
<h1>Counter</h1>
<p id="counter">0</p>
<button onclick="add1()"><img src="data:image/jpeg;base64,/9j/4AAQSkZJRgABAQAAAQABAAD/2wCEAAkGBwgHBgkIBwgKCgkLDRYPDQwMDRsUFRAWIB0iIiAdHx8kKDQsJCYxJx8fLT0tMTU3Ojo6Iys/RD84QzQ5OjcBCgoKDQwNGg8PGjclHyU3Nzc3Nzc3Nzc3Nzc3Nzc3Nzc3Nzc3Nzc3Nzc3Nzc3Nzc3Nzc3Nzc3Nzc3Nzc3Nzc3N//AABEIADYAXAMBEQACEQEDEQH/xAAcAAEAAgIDAQAAAAAAAAAAAAAABQcCBgMECAH/xAAvEAABAwMBBwIEBwAAAAAAAAABAAIDBAURMQYSEyFBYYFRcTJCkeEHI4KhsbLx/8QAGwEBAAIDAQEAAAAAAAAAAAAAAAQFAgMGAQf/xAAtEQEAAgECBAQEBwEAAAAAAAAAAQIDBBEFEiExE0FR0RRxseEiMmGBkcHwBv/aAAwDAQACEQMRAD8AvFAQEBAQEHQmvNshcWy19M1w1HEGQtVs+Kve0MJyUjvLuxvbJG2Rhy1wBafULZE79WbJe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