Yes but with caveats.
When your app is in the background idle it will be suspended and live in memory (RAM). If iOS needs resources for foreground task it can purge suspended apps from memory.
The caveat, when app first enters the background state it is given time to take a snapshot of its UI and what you were doing and other user relevant data and then its supposed to try to reduce its memory footprint. iOS is less likely to purge an app with low memory pressure but if it does when you open it it can restore the snapshot.
For example I just opened the Podcasts app (apple) and it opened up exactly where I left off on Nov 7 2023. 😂
Youtube on the other hand doesnt really try, it retains data server side for you to goto history and start a video back up approximately where you left off. Its a fairly complex app so I'm sure they have their reasons.