I don’t know if you want to talk specifically about codec settings but it seems overall the compression quality goes AV1 > HEVC/h265 > h264. So if you have the time and/or hardware go for AV1, otherwise HEVC will be perfectly fine. I don’t know of any situations which calls for h264 nowadays.