What is the difference between an alert on document ready and an alert on any event in jquery?

When we set alert or any effect on document ready the effect get executed on page refresh. What is the difference between alert on document ready and alert on any event in jQuery

And when we set any effect on any event under document ready it gets executed when the effect is applied.
Below is the example:

<!DOCTYPE html>
<html>
<head>
<script src="https://ajax.googleapis.com/ajax/libs/jquery/3.6.0/jquery.min.js"></script>
<script>
$(document).ready(function(){
	alert("Alert on document ready");
  $("p").click(function(){
  	alert("Alert on click event");
  });
});
</script>
</head>
<body>


<p>Click me !</p>


</body>
</html>

sexpoundsofttechsolution

What is the difference between alert on document ready and alert on any event in jQueryP