Is it possible to display the UI before a page transition even after the transition?
Also, is it possible to create a UI in a different location and call it from anywhere?
Depending on your use case - have a look in to reusable elements.
These are sort of ‘blocks’ you create once and then add where you’d like them 
Do you mean iframes? (in order to include external content from another website within your Bubble application) If so - then yes you can use iframes within Bubble.
Reusable elements are not iframes. They are an elements/page that can be reused multiple times throughout your app. Bubble uses them to dynamically build pages.
Sorry, the iframe wasn’t what I was looking for.
I want something that I can create and use anytime I want, like a function in programming.
Reusable elements are what you want.