If I understand you correctly, you can simply do a join to find the correct value, and update MainData with that value;
You can either use a common table expression...
WITH cte AS (
SELECT a.*, b.categorygroup cg
FROM MainData a
JOIN CreditorList b
ON a.creditorname = b.creditorname
)
UPDATE cte SET categorygroup=cg;
...or an UPDATE/JOIN;
UPDATE m
SET m.categorygroup = c.categorygroup
FROM maindata m
JOIN creditorlist c
ON m.creditorname = c.creditorname;
...and always remember to test before running potentially destructive SQL from random people on the Internet on your production data.
EDIT: To just see the date in the same format without doing the update, you can use;
SELECT
a.type, COALESCE(a.categorygroup, b.categorygroup) categorygroup,
a.creditorname, a.debitorname
FROM MainData a
LEFT JOIN CreditorList b
ON a.creditorname = b.creditorname