You may have no error when creating the trigger but you likely have errors at run-time:
CREATE OR REPLACE function sync_and_maintain_users_table()
returns trigger as
$BODY$
begin
insert into global_db.public.table2
values (user_uuid, user_registration_date, user_service_provider);
end;
$BODY$
language plpgsql;
CREATE FUNCTION
CREATE TRIGGER sync_user_table AFTER INSERT ON table1
for each row execute procedure sync_and_maintain_users_table();
CREATE TRIGGER
insert into table1 values(1);
ERROR: cross-database references are not implemented: "global_db.public.table2"
LINE 1: insert into global_db.public.table2
^
QUERY: insert into global_db.public.table2
values (user_uuid, user_registration_date, user_service_provider)
CONTEXT: PL/pgSQL function sync_and_maintain_users_table() line 3 at SQL statement
In PostgreSQL you cannot reference directly another database with database.schema.object syntax.
And if you fix this you have another error:
CREATE OR REPLACE function sync_and_maintain_users_table()
returns trigger as
$BODY$
begin
insert into public.table2
values (user_uuid, user_registration_date, user_service_provider);
end;
$BODY$
language plpgsql;
CREATE FUNCTION
insert into table1 values(1);
ERROR: column "user_uuid" does not exist
LINE 2: values (user_uuid, user_registration_date, user_service_...
^
HINT: There is a column named "user_uuid" in table "table2", but it cannot be referenced from this part of the query.
QUERY: insert into public.table2
values (user_uuid, user_registration_date, user_service_provider)
CONTEXT: PL/pgSQL function sync_and_maintain_users_table() line 3 at SQL statement
You need to add code to initialize variables used in VALUES clause.
See examples in https://www.postgresql.org/docs/12/plpgsql-trigger.html.