It might be elementor’s issue. Later, I found out that other video formats worked(like vimeo), but youtube urls were not showing the video on the website. Instead I downloaded and inserted the videos manually(as a temporary solution), that’s why you see it working.