My employer asked me to leave the job in 30 days, and added that I will not needed to be in the office for that period.
What should I do now? Go to the office or just stay at home?
As Criggie said in the comments, it's likely gardening leave. It's not just tax that would stop you getting another job in that period, it would likely be a contractual issue too. The company is essentially paying you for the month to not go to their competitor.
Get the terms of your dismissal in writing, including the company's expectations diuring this period. Until then, business as usual. Go to work, look busy. If they send you home, get it in writing.
Now, what to do with your month off... Use the time for 3D: Decompression (get the old job out of your system), Development (improve your skillset) and Determination (get out there and line up a job for the first day after the 30 days ends).
Seems fairly obvious, given the last bullet point above.
•I have recently completed the project. So there is no work allocated for me.
If you've completed your project and there's no further work, there's no need for you to go back into the office again.
Time to move on.
EDIT: The clause quoted above seems to have been added by a third party, it wasn't there when the question was first asked.
If I was you I would only go in each day if the alternative was being unpaid. If there is any loose ends you need to wrap up I would go in and do that as quickly as possible, then I move on and start my search for a new job.
You need to ask yourself is there any value to you going to the office over staying home and job hunting? When I was given a months notice by an employer we were given certain access to write up code for portfolios, retrieve anything personal from email etc.
I believe most of the people who were leaving used at least a few days for this purpose. However we weren't expected or allowed to work and were being paid for the month regardless so the majority of people only came in for a day or two.