Regarding general knowledge about mortgages, I would start there:
Also, you can find “Rent vs Buy” calculators online, e.g.: https://www.moneyland.ch/en/rent-or-buy-calculator
It will help you to identify any variables you may (or may not) have missed in answering this question.