Getting page by url

It exists several options to find the page based on url-slug but it’s depend on what the purpose why we need to find the page by the url what method that suits the need best.