How To Change From Index.php?dispatch=Products.view&product_Id=222 To Friendly Url(Seo)

Hope you are doing well

i don't know how to change the urn to SEO friendly link
for example i am trying to change these links to their respective seo name but i don't know how in storefronts should be

another example for categories
should be

another example for products
should be

what i have now is the current path got it from runtime(Registry::get('config.current_url')) which is like


so i want to get the corresponding seo url of this path

but the domain name i don't want because it's already pre-defined
because i customizing the hreflang to support subdomains so google's crawls can go through all the domains but, currently google redirecting to 301 error

so what i changed in test server are below
1. design/themes/responsive/templates/addons/seo/hooks/index/

2. app/addons/seo/func.php --- function name: fn_seo_dispatch_before_display
i just added the storefronts

so could you please advise