The ultimate confusing question which you can find as a newbie in the investing field.
The answer to this question is for the most part yes. But it depends on how you look at it.
Owning stocks and owning shares both means that you own a small piece of a company.
However normally you will see that the term “shares” are used to refer to the size of an ownership stake in a specific company which of course you as a investor choose. You will also see that the term “stock” is often used as a meaning of equity as a whole.