Both ways are good, Usign the context directly without "Provider" property is a feature of React 19 version
For more information you can have a look on react 19 post with the new features released on the framework
https://react.dev/blog/2024/12/05/react-19#context-as-a-provider