Yes, Musk's acquisition of Twitter was considered a hostile takeover. On April 14, 2022, Musk made an unsolicited offer to purchase the company. After which, Twitter's board implemented a poison pill defensive strategy to prevent the acquisition.
However, on April 25, the board unanimously agreed to accept Musk's buyout offer of $44 billion.