By default, we do not have a specific setting to hide your WordPress website’s View Source. However, you may use a 3rd party plugin that has the capabilities to hide the View Source of your site. The plugin is called Disabled Source, Disabled Right Click, and Content Protection.
Just to set your expectation, this plugin is a third-party plugin which we are not able to guarantee support and compatibility as we have not fully tested them. However, you are free to try.