Inside app/views/layouts/application.html.erb
replace <title>...</title>
by
<title>
<% if content_for?(:title) %>
<%= yield :title %>
<% end %>
</title>
You'll be able to change the title dynamically from any other view, for instance:
# app/views/articles/index.html.erb
<% content_for(:title) do %>
Articles
<% end %>
# app/views/locations/index.html.erb
<% content_for(:title) do %>
Locations
<% end %>
Let's assume that you have @article
object with name
field
# app/views/articles/show.html.erb
<% content_for(:title) do %>
@article.name
<% end %>
UPD
As suggested by @engineersmnky you can pass the title as a parameter content_for(:title, 'Articles')
https://apidock.com/rails/ActionView/Helpers/CaptureHelper/content_for