No problem. It doesn’t matter how many sites you have in the network since it will just query out that single ID from the wp_sites table (I believe).
get_current_blog_id()
does not make an extensive heavy query regardless of size of your network. So it should be fine!
If you’re still worried you can use a tool like Query monitor to see exactly how it affects the sites
https://sv.wordpress.org/plugins/query-monitor/