If you want to access the page on which the widget is placed you can use the 'Page' property of the widget properties class as explained in the documentation (https://docs.xperience.io/developing-websites/page-builder-development/developing-widgets#Developingwidgets-Accessingthedataofthecurrentpage.2).
Or you can use the "IPageDataContextRetriever" with the "Retrieve" method to access the page.