A shareholder is someone (can be individual, company, organisation etc.) who owns part of the company through shares.
A stakeholder is someone (can be individual, company, organisation etc.) that is impacted by the business or project. Stakeholders have an interest in the success of the business. There are muliple stakeholders like employees, owners, suppliers, but also communities etc.
Shareholder is always a stakeholder. But stakeholder is not always a shareholder.