How do I update my firmware after installing a 400XL kit on my Ender 3
Without knowing exactly which Youtube videos you've looked at, I think where I would start is by downloading the latest Marlin Fimrware and configuration files for the Ender 3 with 4.2.7 board:
Latest Release of Marlin Firmware on Github
Configuration File Repository on Github
Microsoft visual Studio
PlatormIO
If I were doing your upgrade in your place, I would refer to this video for how to compile the firmware for the correct board. I've had to compile firmware for my Ender 3 a few times and I sometimes forget a step. This video is the best that I've found for showing/reminding me of each step.
Essentially, what I think you need to do is compile your firmware as if it were a stock Ender 3 V2 using the settings files I linked above but then change your print area the configuration.h file to match the X400 x Y400 x Z500 print bed area.
Look for the following:
// The size of the print bed
#define X_BED_SIZE 200
#define Y_BED_SIZE 200

Change to the following:
// The size of the print bed
#define X_BED_SIZE 400
#define Y_BED_SIZE 400

And then look for
#define Z_MAX_POS 200

and change to:
#define Z_MAX_POS 500

There are other changes you'd need to make to the settings file (refer to the video for those). I haven't done your particular upgrade on my machine, so I'm just guessing those extra couple of changes would work for you.