It's typically recommended to wait at least one month after a hair transplant before you resume strenuous activities like going to the gym. This allows your body to heal. However, it's essential to consult with your surgeon for personalized advice, as recommendations may vary depending on the procedure and individual factors...I have seen varying advice from doctors regarding this and your surgeon should be the primary source of advice for you as he/she would be solely responsible for this.
I believe it's a fortnight for FUE and a month for FUT for most surgeons.
Dr Cole once when I interviewed said he had no problem with patients training immediately as long as they don't bang their head.
The risk is high bloody pressure through strenuous lifting pops grafts out, or sweating causes infection. I've not really heard of either actually happening.
As with all things, follow the advice of your surgeon and apply more caution of you feel better doing so.