"The maximum number of free accounts have been activated on this iPhone" message is discussed in the support document "If you see a Could Not Create Apple ID or Could Not Set Up iCloud message." Click on this link --> https://support.apple.com/HT210743
This message generally "means that you have exceeded the number of new Apple IDs you can set up with iCloud on a single device in one year." See the recommendation in the link on alternative methods for setting up iCloud accounts, e.g. on a computer.