On this page of the LEGO Star Wars The Skywalker Saga guide, you will find information about the next-gen patch. You'll learn is the update free or will you need to pay for it.
PS5 and Xbox Series X
The old and new generation versions are sold for a similar price. If you purchase the PS4/Xbox One version, you'll be able to update the game to a next-gen version for free. The upgrade is free for all editions on Sony and MS consoles. Additionally, in digital stores the game is sold for both platforms, for example the PS4/PS5.