If a miner censors a valid transaction, it stays in the mempool until another miner includes it. Other miners want to maximize fees, so they’re likely to pick it up.
Bitcoin’s incentives makes censorship tough and costly for any miner trying it. To block a transaction entirely, a majority of miners would need to coordinate, which is hard and expensive. If miners tried sustained censorship, users could push back with a UASF, forcing the network to ignore their blocks and making censorship attempts pointless.