Hello! The structure "It's + adjective + to do" is used to express an obligation or a recommendation to perform a certain action. For example:
It's important to eat a balanced diet.
It's necessary to study hard to pass the exam.
It's best to arrive early for the meeting.
On the other hand, the structure "It's + adjective + doing" is used to describe how someone feels or what their current state is while doing a particular activity. For example:
It's exciting watching a movie in the cinema.
It's relaxing swimming in the pool.
It's frustrating waiting in line for a long time.
So, the first structure talks about the necessity or importance of an action, while the second structure describes the emotions or feelings associated with an activity.