Deploying using AWS ec2 External URL not working

I am working on deploying the Streamlit app on AWS EC2 for internal use. I can view the app in my browser from Network URL, but the External URL didn’t work. It takes some loading and then says ’ This site can’t be reached. XX.XXX.XXX.XX took too long to respond.’
I am following this tutorial, the difference is that when I configure the security group, I didn’t add a rule with Type: “Custom TCP Rule”, Port Range:8501, and Source: Anywhere, instead I just copied some internal security groups. But their Port range and Protocol are “All”, and Source is some specific IP addresses. And my ec2 instance doesn’t have Public IPv4 address and Public IPv4 DNS. So I am using my Private IPv4 addresses to ssh. I wonder if that’s the problem. Do you have any advice on how to fix it? Thanks!

nvm, I just found people can access the app using the network URL.