Hi
Welcome to Just Answer
There is no set place to attach it, it depends on what car it is fitted to, but I usually attach any new earth straps between the top rear gearbox bolt that secures the bell housing in the gearbox to the engine, to either any bolt that is fixed to the bulk head such as a cable clip or an electrical componant mounting, or I secure it to the battery box via one of the mounting bolts.
Hope this helps
Regards
Trev
UK Car Mechanic
NVQ 3, Modern Apprenticeship, MOT Tester, 14 years experience working on all makes and models