WordPress Single Post image gallery as slider


I would like to make image sliders within my single posts, but the following way:

I want the attached gallery to show as an image slider, I suppose with javascript slider.

I have no idea how to achieve that, I tried just inserting splidejs in my single-post template, did not work.

Could someone help me to achieve it?

The basic idea is whatever images I insert as a gallery to a single post through the wp-admin ui, it would appear as slider within the post.