Brigatinib works by inhibiting the activity of certain proteins known as anaplastic lymphoma kinase (ALK) and ROS1. These proteins are involved in the growth and spread of cancer cells. By blocking these proteins, brigatinib helps to slow down or stop the proliferation of cancer cells.