What could be the best way to update content automatically without reloading webpage?

I have heard ajax and jquery are good options but apparently jquery is loosing relevance in web development.

This is too broad a question, inviting replies that are too subjective.

Where are you currently at in your learning journey?

Are you comfortable with Javascript?

What specific use case do you have in mind? A fully reactive application type of site, or something with just a tiny dynamic element that needs updating?

The short answer, regardless of your answers to those questions, is you need JavaScript.

Whether that’s raw JavaScript, jQuery, or a modern framework / library such as React, Angular, Vue depends on your needs, experience, and ability / time to learn.

But… jQuery is fine and actually pretty great. I wouldn’t dismiss it as a beginner if you just need to get a job done. jQuery powers an extraordinary number of websites.