you can create an obsidian.css file in your vault and add the following code
:root
{
--font-monospace: "Source Code Pro", monospace;
}
.markdown-source-view { font-family: var(--font-monospace) }
If you are already using another theme, you might have to modify it accordingly
There are some other posts where you can find more information on how to do it according to you needs.
Hope it helps!