Assuming you aren't visiting Bermuda or Canada, the Carnival webstie says:
Except where differences are specified, all unvaccinated guests age 2 and older must provide the negative result of a lab-administered or supervised self-administered PCR or antigen COVID test taken up to 3 days before embarkation.* (For example, if the sailing is on Saturday, the test may be taken any time from Wednesday.)