I want to focus/highlight part of text(marked or selected in some other way) as shown in the picture(selected texts stays as it was but other text is dimmed)
I think Focus is what you’re looking for.
Focus provides focus-mode that dims the text of surrounding sections, similar to iA Writer's Focus Mode.
You can find it on MELPA, if you have it configured in your init file, via
M-x package-install focus. Once installed, you can enable it with