An optician is a professional who focuses on the quality of your vision and finding the most suitable solutions for your everyday visual needs, while an ophthalmologist is a medical doctor specializing in eye health.
If you need to assess your vision correction, choose new lenses, or improve the comfort of your glasses, you can consult an optician. On the other hand, if you wish to check the health of your eyes, you should consult an ophthalmologist.
The two professionals play complementary roles and do not replace one another.