There are three ways you can find which WordPress version is running on your site:
How to find your WordPress version in the admin area
When you first log in to the WordPress admin area as an admin, you will usually see the "At a Glance" widget. You will find the current version there.
If you don't see the "At a Glance" widget, you can usually get it by clicking "Screen Options" and checking "At a Glance" on the Dashboard.
If you still don't see it there, you may have added a plugin that customizes the look of the dashboard.
Another place to look for the WordPress version is at the bottom of most of the pages in the admin area. However this will show a link to update the version if there's an update available, instead of the current version.
The last common place to look in the admin area is under Updates. It will usually show the current WordPress version, unless there's a core update available.
How to find the WordPress version of any site in the HTML source
If you view the source of a WordPress website, you'll often see
<meta name="generator" content="WordPress 5.8.2" />
where "5.8.2" is the WordPress version running on that site.
You will find it between the <head></head> tags at the top of the website.
If it's not there, they may have turned it off using:
remove_action( 'wp_head', 'wp_generator' );
How to find the current WordPress version using PHP code
The easiest way to find the current WordPress version using PHP code is with
get_bloginfo( 'version' );
You can see it in action if you hook it into your content and echo it.
It will simply create a string with the version number.
It's important to use the lower case 'version', or you will get the title of the website. That's the default for get_bloginfo().
If you want to go a layer deeper, all get_bloginfo( 'version' ) does is to output the global variable $wp_version.
You could also use:
global $wp_version; echo $wp_version;
Finally, if you just want to dig in to the files and find the version number, it is stored in /wp-includes/version.php under the variable $wp_version. You're unlikely to find it as an entry in the database, unless another plugin has added it there.