This is entirely up to you. The general recommendation is to take at least 2 weeks off from work, but there have been patients who have gone back to work as early as 72 hours after surgery.
If you work from home, take at least one full week off after surgery before resuming work.
If you commute into the office, take at least 2 weeks off after surgery before resuming work.
It’s always better to ask for more time off than you think you will need and can always go back earlier if you feel good. For example, arrange for 4 weeks off and then go back after 2 weeks. The only restriction is that you can’t lift anything heavier than 10 pounds for 4-6 weeks post-operatively.