CREATE OR ALTER
was introduced in SQL Server 2016 SP1. If it's not working, then you have an earlier version of SQL Server which doesn't support that syntax.
KB3190548 - Update introduces CREATE OR ALTER Transact-SQL statement in SQL Server 2016 - Microsoft Support[
^]
You either need to update to a version of SQL Server that supports this syntax, or use an alternative syntax instead.
You also still need to use proper JOINs, and get rid of the ancient pre-ANSI-92 syntax you're using everywhere:
SELECT Branch_Name, Branch_id, COUNT(*)
FROM Branch
INNER JOIN customer ON customer.Customer_id2 = Buysfrom.Cid
INNER JOIN Buysfrom ON Buysfrom.Bid = Branch.Branch_id
GROUP BY Branch_Name, Branch_id;