Please use code-tags when posting code, you don’t need to be posting images of code, it always makes it impossible to refer to specific lines of code etc.
If I’m following what you’re asking, it looks like you’ve not read the documentation for Raycast because you’re not looking at the result it provides you (hit) which is a RaycastHit. The API doc also shows you how to select which layers etc.