This is a somewhat common misunderstanding that new folks in this space can have.
And my unpopular opinion is that it's understandable and it's definitely not your fault. I always try to get to the bottom of where is any given misunderstanding coming from (rather than to dismiss it with food slices...).
In this case I believe it very much depends on what facts about Bitcoin you learn first:
E.g. you first hear about bitcoin and the only facts that you learn are
  • Bitcoin is some form of money that has something to do with computers.
  • Bitcoin is infinitely divisible.
  • Bitcoin is on a computer as some code.
Then you could end up with a conclusion that the valuable thing is "one piece of code". If you have two pieces of code you have twice the value and you can buy 2 beers instead of just one. And so if you can infinitely split it up you will get more of it - hence inflation.
The clear point that I want to make here is that if Bitcoin would be designed (drastically) differently, then there could indeed be situation where we give value to individual "pieces" and those pieces are hardcoded to have "unit value". E.g. one piece is 1 coin.
Luckily this is not the case. The main key to understanding is: the whole network will ever only have 21 millions of bitcoins. The network cannot be divided differently. The network is not arbitrarily/infinitely divisible. Now the thing that actually is divisible is each individual bitcoin. Each individual bitcoin can be infinitely divided into fractions.
I believe actually part of this confusion stems from what we call Bitcoin... whether we are talking about the single one coin or whether we are talking about the system+network as a whole.