I really dont know why they ask money for just saying where the problem is.Anyways i realised that xui is actually generating the SSL.The problem is that in the nginx config,it doesnt change the new generated ssl.So you have to go to /home/xui/bin/nginx/conf/ssl.conf and replace the ssl file names,with the actual generated file.For example:
ssl_certificate /home/xui/bin/certbot/config/live/YOURSSLNAME/fullchain.pem;
ssl_certificate_key /home/xui/bin/certbot/config/live/YOURSSLNAME/privkey.pem;
ssl_protocols TLSv1.2 TLSv1.3;
then /home/xui/bin/nginx/sbin/nginx -s reload
and the ssl ll start working.