The cost of a new fixed-rate mortgage has been rising in recent weeks as lenders face higher costs.