Show latest posts in a plain HTML website custom widget [closed]

Perhaps you could consider using WP REST API to get the posts with a XMLHttpRequest in javascript instead of trying to get php work on .html file(s).

From the REST handbook,

The WordPress REST API provides an interface for applications to
interact with your WordPress site by sending and receiving data as
JSON (JavaScript Object Notation) objects.

And

It provides data access to the content of your site, and implements
the same authentication restrictions — content that is public on your
site is generally publicly accessible via the REST API, while private
content, password-protected content, internal users, custom post
types, and metadata is only available with authentication or if you
specifically set it to be so.