Value is based on 3 things, rarity, collectibility/demand and condition.
As an example the 1909 S VDB is not rare by any means, but it's in demand and high grade coins are very much in demand, hence you have a very expensive coin.
I have a coin from Portugal that maybe only 100 exist, it's also high grade but very little demand so I paid under $100 for it.
What can happen is that bubbles can form. For example,
Peace dollars were looked down upon compared to Morgan's which meant that one could do the
Peace dollar in AU (1921 to 1935) for about $600/$700 in 2019. In 2021 with the release of new Peace and Morgan's the demand for
Peace dollars went up thereby increasing the prices. The
Peace dollars aren't rare but they are in demand hence the price increase.
So to answer your question, yes coins can go up in price and can also go down in price.