Photoshop is primarily used for editing and manipulating raster images and photographs. Over the years it’s grown to do a “few” other things like working w/ vector shapes, animations, etc., etc. Overtime it just grew into this all-in-one tool… Before Sketch came out this was how and where I created mockups and interfaces elements
Illustrator is purely a vector program. Many moons ago I worked in Ai as a prepress artist outputting, separating and designing film for silkscreen printing but nowadays I primary use Ai for creating wireframes and/or icons. Other designers can draw directly into it…
All that said, Sketch is more specialized in that it’s used for creating digital interfaces, can output specific assets to different resolutions. They include the ability to draw your own vector shapes (similar to Ai) and use a similar artboard functionality in order to create all the screens necessary in an application. Neither Sketch or Xd can manipulate photos like Ps. So, I still need Photoshop. Neither Sketch or Xd are as robust as Illustrator when it comes to creating vectors, so I still use Ai.
Sketch can create hi fidelity designs, just like Ps or Ai. Fidelity is simply how “finalized” something is. A sketch of a main menu would be low-fi while a full pixel-perfect mockup w/ photos, colors, typography, white space, etc., etc, would be considered high fidelity.
Photoshop, Sketch, Illustrator, Xd — they’re all tools. Use them where you see fit, however it helps you get the job done bud.