Welcome and congrats on finding the best place on the web for info and knowledge about trains. There's plenty of folks here who have some great skills and experience that freely share and try to help.
Are the derailments occuring with the engine or on some cars? First and easiest thing to check...with an HO Standards gauge, check the space between the wheels of everything. You'd be suprised just how many wheels sets are close but not exactly spaced correctly out of the box. Next, I'd suggest taking a magnifying glass and closely look at the entire X-crossing for plastic burrs that might be affecting a wheel as it goes through the intersection. Also, with a gauge, check the rail spacing as it's possible that the width between the rails is too narrow causing a wheel to ride up and out. Are there curved track sections right before the X-crossing? It's possible that the radius isn't quite right to straighten the cars out just before entering the crossing and if there's any coupler problems, the end result might be a derailment at the crossing that had its start a few inches prior. Finally, it could be the wheels themselves. I'm just learning about the various track codes and which wheel works best on what code. But I've seen on my layout that some wheel types (Low rise vs. High profile - if I'm using the terms correctly) do better than others and where I notice it is over the turnouts I'm using. I can always count on a derailment from a light weight car using a low profile wheel, so I try to make sure the car is correctly weighted and has he higher profile wheels. That may not be quite prototypical, but it keeps the derailment gremlins at bay and allows me to run a train with no derailments for hours.
But there's plenty of guys here with way more knowledge than me who could add their two cents...