In my case I only managed to enable the Roadmap feature in Jira v8.22.4 by just opening the Roadmap in a browser under incognito mode.
What I was facing before was the following error "Something went wrong. There is no valid configuration for this roadmap. Please configure it in the board settings."
If you go to Projects > View all projects you should see type of your projects.
If you want to use Roadmaps that are available for Next-Gen type of projects, you can learn more how to enable them here
If you use Classic projects it’s not possible to use the roadmap if your board filters include issues from multiple projects. You need to make sure your board filter contains only issues from a single project
Here is documentation how to configure the filter