I think the terms are used interchangeably, but I believe the distinction is that "stocks" are used to refer to owning shares in some company, as in "I have some stocks". Shares refers to owning shares in a particular company, so "I have shares in this company".
I may be wrong, and I think most people use them as synonyms anyway.
People who don't work in business and finance use them interchangeably, but they're not really the same thing. Stocks are made up of shares - if I have shares in a company, I only have them in that company; if I own stocks, it means I have a portfolio of shares in two or more companies. Here's a good explainer with more detail:
Edited to add - that's just about the distinction in English, of course - Norwegian uses the same word for both!