Quick comments, both are pretty good laptops. OLED screens seem to be the hot things now, though. Can't go wrong with either, but I personally lean towards the HP X360 as being more versatile. With Microsoft's rumoured improvements with Win 11 22H2, touch/pen computing could make for more ways to use a laptop naturally. While I've always liked the XPS brand, it has not stood out for me these past few years.
Intel 11th Gen > 12th Gen (battery life concerns).
What is important is getting as much RAM as you can since they are all soldered, minimum 16GB, 32GB is preferred for longevity reasons (depends on your usage patterns) 8GB is too low going forward. We tend to multitask a lot while doing research for assignments - multiple apps open, web browser windows, etc.... I even run out of RAM on a 16GB laptop at times.
As a part-time student, I miss my X1 Yoga that I sold off to fund my Thinkpad because I need >8GB of RAM. The pen inputs turned out more useful (including highlighting PDF textbooks and all) than I expected. Microsoft OneNote is also pretty good with the pen input, so that was also a noticeable loss. Ended up buying an iPad to do eBook reading, rather than having all the files on one device.