How to redirect current user to their dynamic page with the Login option

I have been looking everywhere to make this possible but without result I would beg a lot for help as I can make it possible for the current users to redirect to their dynamic page with {ID} or {Name} or whatever if only I had created my registration and entry forms this issue is driving me crazy and I have been stuck here for a long time trying to resolve it please help me I would appreciate it very much Thank you.

Details →
https://www.wix.com/velo/forum/coding-with-velo/login-with-link-name-id?appSectionParams=%7B%22origin%22%3A%22member_posts_page%22%7D <—

//// Login - to dynamic page///////import wixUsers from'wix-users'
;import wixLocation from'wix-location';
import wixWindow from'wix-window';
import wixData from'wix-data'; 

 $w.onReady(function(){});
 
 exportfunctionloginButton_click(event){
 
 let email = $w("#email").value;
 let password =$w("#password").value;  
 
 wixUsers.login(email, password,).then(()=>{   
 console.log("User is logged in"); 
 
  wixLocation.to(`/member/${ID}`);//URL login})
  
  .catch((err)=>{     
   console.log(err); 
   $w("#errorMessage").show();///error});}

I have also looked at articles similar to this issue but to no avail.
https://www.wix.com/velo/forum/coding-with-velo/direct-repeater-item-to-dynamic-page <—

https://www.wix.com/velo/forum/coding-with-velo/login-issue-cannot-direct-to-dynamic-page-after-login-2 <----