I don’t know where you are in the world, but for the last several decades, churches in USA are usually locked outside of Mass times, unless the church is hosting another activity or event in the church, such as confessions, rehearsal for choir/ wedding/ other event, meetings for prayer groups or other parish groups in the church (some churches have these in the same building with the church and some use a separate building), Adoration (some churches have this in the church and some have it in a separate chapel or separate building) etc.
Even those churches which are open 24/7 for Adoration often have some security like a key code to get in.
This is all necessary for the protection of the church, the Blessed Sacrament, and sometimes even the people inside doing Adoration or whatever. We have had incidents of churches being broken into, vandalized, set on fire etc. Leaving churches unlocked would just invite more of this.
I would recommend that you look at churches in your area and learn their schedules so you’ll know when a church might be open for prayer; also look into whether any churches have Adoration going on all day in which case you should be able to go pray in their chapel at least during daylight hours.