If u are taking about a craniotomy
where the skull was opened and put back, I'd suggest discussing it with your surgeon at your routine post-op visit.
The answer will vary among docs and depending on the nature of the surgery, but at least six to eight weeks is a good assumption. Even then, you should start slowly & build over time, paying attention to what your body is telling u. Good Luck.