This clinical trial is for men and women with advanced urothelial cancer. The purpose of this study is to compare the effects of an investigational drug called erdafitinib to those of docetaxel or vinflunine (chemotherapy) and of pembrolizumab (immunotherapy). The treatment group will be selected by chance (like flipping a coin) by a computer program. Depending on previous treatments, there will be a 50% chance of being allocated to the erdafitinib and a 50% chance of being allocated to the chemotherapy or immunotherapy. Participants in the chemotherapy or immunotherapy arms will receive treatment intravenously every 3 weeks. Participants receiving erdafitinib will take the tablet by mouth every day. Participants will continue on treatment as long as they are responding to therapy and not experiencing unacceptable side effects.